Profile photo management fails with Profile scope, works with Contacts scope?

12 views
Skip to first unread message

Jay Lee

unread,
Mar 2, 2012, 8:13:23 AM3/2/12
to google-app...@googlegroups.com
I'm working on adding user profile photo management to my application. My app was already using the Profiles API and it's successfully able to hide/unhide users from the global GAL. However, when attempting to perform any sort of user profile photo management I'd get an "Authsub token has wrong scope" error. After some trial and error. I've found that the code fails if my OAuth token is scope for profiles:


but it works if I "widen" the scope to the Contacts API scope:


attached is a simple app that demos the issue by attempting to get the profile photo for every user in a GA domain and save it to a file. It should fail OOB with the AuthSub error when attempting to grab the 1st photo but if line 73 is uncommented and 74 is commented and then oauth.txt is recreated (with Contacts API scope this time) it should work.

Jay


user-photo-manager.py

Jay Lee

unread,
Mar 2, 2012, 8:16:26 AM3/2/12
to google-app...@googlegroups.com
I apologize, I assumed Profiles API would be covered here but just noticed it's listed under the Contacts API forum. I'll post there.

Thanks,

Jay
Reply all
Reply to author
Forward
0 new messages