Hi,

I am having the same issue.  Creating a Access Token but it won't get 
accepted and returns the 404 response.  I have read that you need may need 
to be using Google for Business for the Service accounts to work as 
expected.  Does anyone know if this is the case?

Thanks 

Ben

On Tuesday, 2 June 2015 17:32:45 UTC+1, Nico Hendrickx wrote:
>
> This is by the way the code snippet i am using:
>
> $client_email = '';
> $client_id = '';
> $private_key = file_get_contents('key.p12');
> $scopes = array('https://picasaweb.google.com/data/');
> $credentials = new Google_Auth_AssertionCredentials(
>     $client_email,
>     $scopes,
>     $private_key
> );
>
> $client = new Google_Client();
>
> $client->setAssertionCredentials($credentials);
> $client->setClientId($client_id);
>
>
> if ($client->getAuth()->isAccessTokenExpired()) {
>     $client->getAuth()->refreshTokenWithAssertion();
> }
> $accesstoken = json_decode($client->getAccessToken());
>
>
> $at = $accesstoken->access_token;
>
> $ch = curl_init();
> $url2 = 'https://picasaweb.google.com/data/feed/api/user/default';
> $header = array("Authorization: Bearer ".$at,"GData-Version: 2");
> curl_setopt_array($ch, [
>     CURLOPT_URL => $url2,
>     CURLOPT_HTTPHEADER => $header,
>     CURLOPT_RETURNTRANSFER => true,
> ]);
> $response = curl_exec($ch);
> curl_close($ch);
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Picasa Web Albums API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-picasa-data-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to