简体   繁体   中英

Gdata signed request error: “Unknown authorization header”

I have a problem with Updating and Deleting events using signed requests. Inserting events works just fine. But when Updating and Deleting I receive an "Unknown authorization header" 401 error.

For ALL three operations I first generate the client like this:

$client = new Zend_Gdata_HttpClient();  
$client->setAuthSubPrivateKeyFile('certificates/gcalkey.pem', null, true);
$client->setAuthSubToken($session_token);
$gdataCal = new Zend_Gdata_Calendar($client);

To Update an event I use this:

$eventOld = $gdataCal->getCalendarEventEntry($eventUri);

$eventOld->title = $gdataCal->newTitle('NEW NAME');
try {
    $eventOld->save();
} catch (Zend_Gdata_App_Exception $e) { print_r($e); exit; }

And it gives me the "Unknown authorization header" error. But the same code, using unsigned requests, works.

Where might be the problem? I tried modifying $eventUri to both https and http, but it seems it does not have any effect.

I've been getting this 401 error message too, creating the client and service the same way. It can retrieve a list of calendars, but fails when retrieving an event feed.

Has this worked for you before? It might not be officially supported yet .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM