Hi, 
I'm trying to get list of photos from my albums from Google Photos. I'm 
trying to use Picasa Web API with OAuth2 authorization using service 
account (so I don't need to manually allow app to access my photos).
1. I created new project on Google Developer Console and since there's no 
Picasa API listed I just added the service account credentials and 
downloaded p12 file.
2. I authorized the generated client id within Google Admin "Manage API 
client access" section adding https://picasaweb.google.com/data/ as API 
scope.

I'm using this simple Python script to get list of all albums from Google 
Photos:
#!/usr/bin/env python3

from oauth2client.client import SignedJwtAssertionCredentials
from httplib2 import Http
import config

p12 = open("wallpaper.p12", 'rb').read()

credentials = SignedJwtAssertionCredentials(config.account_email, p12, 
'https://picasaweb.google.com/data/')

http = Http()

credentials.authorize(http)

resp, content = 
http.request("https://picasaweb.google.com/data/feed/api/user/"; + 
config.picasa_user_id)

print(content)

wallpaper.p12 is a p12 file downloaded from Developer console,
account_email is set to service account email address,
picasa_user_id is my profile user id.

Unfortunately, after running this command, I'm only getting some profile 
information - it looks like the request was not authorized to get data from 
my profile.

Can anyone tell me what's wrong?

-- 
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