0
votes

How can I get profile picture of GMail user who haven't joined Google Plus?

I have application that enables authentication of users using Google. Normally, I retrieve their profile picture using Plus API like:

https://www.googleapis.com/plus/v1/people/<user_id>?fields=image&key=<token>

This works for majority of users, however I noticed it returns 404 for users who haven't joined G+ even though they have profile picture.

1

1 Answers

0
votes

It isn't clear if the user authorizes access to their information on their behalf using OAuth and, if so, what scopes you're requesting.

If they are going through OAuth on your site, and you're requesting the profile scope, you should be able to get their profile information, even if they're not on Google+. If you're requesting one of the plus-based scopes, it may require them to have a G+ profile.