google-api - email from Getting Google+ profile picture url with user_id

5 Answers

UPDATE: The method below DOES NOT WORK since 2015

It is possible to get the profile picture, and you can even set the size of it:<user_id>?sz=<your_desired_size>

Example: My profile picture, with size set to 100 pixels:

Usage with an image tag:

<img src="" width="100" height="100">

Hope you get it working!

get gmail profile picture

I know that lots of social network APIs provide a way to construct a url to the profile picture of a user, using their user_id or username. For Facebook it looks like this:

Now is there something like this for Google Plus? Or any other way to get user's pic without an API call??

Approach 1: (no longer works)<user_id>?sz=<your_desired_size>

Approach 2: (each request counts in your api rate limits which is 10k requests per day for free)<user_id>?fields=image&key={YOUR_API_KEY}

with the following response format:

{ "image": { "url": ""; } }

Approach 3: (donot require api key)<user_id>?alt=json

in the json response you get a property named "gphoto$thumbnail", which contains the profile picture url like the following:

You may notice in the url the portion "s64-c" which means the image size to be 64, I've tried using other values like "s100-c" and they worked. Also if you remove the "s64-c" part and append the "?sz=100" parameter, that will also work as of now. Though this is not very good way of getting the profile picture of a gplus user, but the advantage is it do not require any api key.

If you want to show the profile picture for the currently logged in user, you do not even need to know the {user_id}. Simply using will be enough.

trying to access the /s2/profile/photo url works for most users but not all.

The only full proof method is to use the Google+ API. You don't need user authentication to request public profile data so it's a rather simple method:

  1. Get a Google+ API key on

  2. Make a simple GET request to:< username >?key=

Note the + before the username. If you use user ids instead (the long string of digits), you don't need the +

  1. you will get a very comprehensive JSON representation of the profile data which includes: "image":{"url": " the rest of the picture url...."}

Simple answer: No

You will have to query the person API and the take the profile image.url data to get the photo. AFAIK there is no default format for that url that contains the userID.