开发者

Gdata signed request error: "Unknown authorization header"

开发者 https://www.devze.com 2023-03-20 01:45 出处:网络
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.

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_G开发者_如何学Cdata_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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号