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

On Friday, March 2, 2012 8:13:23 AM UTC-5, Jay Lee wrote:
>
> 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:
>
> https://www.google.com/m8/feeds/profiles   (according to 
> http://code.google.com/googleapps/domain/profiles/developers_guide.html#Auth
> )
>
> but it works if I "widen" the scope to the Contacts API scope:
>
> https://www.google.com/m8/feeds   (according to 
> http://code.google.com/apis/contacts/docs/3.0/developers_guide.html#Auth)
>
> 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
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Apps Domain Information and Management APIs" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-apps-mgmt-apis/-/HydJ7_9fx0IJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-apps-mgmt-apis?hl=en.

Reply via email to