I need to get an authentication token from an Android device (client side) using AccountManager.getAuthToken and then reuse it through Zend_Gdata (server side)
When using the 'cl' calendar, the authTokenType properties work as expected.
Android source:
String calendarToken = getAuthToken(account, 'cl' ...
PHP source:
$token = // value retrieved via Android 'calendarToken' $client = new Zend_Gdata_HttpClient; $client->setClientLoginToken($token); $gData = new Zend_Gdata($client); $feed = $gData->getFeed("http://www.google.com/calendar/feeds/default/private/full");
This works, however when using Gmail mail "authTokenType everything is not so smooth
Android source:
String mailToken = getAuthToken(account, 'mail' ...
PHP source:
$token = // value retrieved via Android 'mailToken' $client = new Zend_Gdata_HttpClient; $client->setClientLoginToken($token); $gData = new Zend_Gdata($client); $feed = $gData->getFeed("https://mail.google.com/mail/feed/atom/");
This continues to throw a "Zend_Gdata_App_HttpException" with the message "Expected response code 200, received 401.
I tried to follow the guidelines for various google data APIs with no luck
source share