Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The result set for the users API does not return the URL for the user's Gravatar.

For reference: http://api.stackoverflow.com/0.8/help/method?method=users

share|improve this question
up vote 17 down vote accepted

The gravatar url can be calculated from the email hash.

string gravatarUrl = "http://www.gravatar.com/avatar/" + emailHash + "?d=identicon&r=PG";

More gravatar info.

share|improve this answer
    
Or, include the size to get a larger icon: ?s=128&d=identicon&r=PG – Arjan May 22 '10 at 21:57
    
r=PG ? or r=G ? – vishnu Nov 1 '10 at 15:54
    
That's up to you. ;) – Joel Jan 21 '11 at 21:19

As part of the response you get the email hash, which you can use to construct the proper request to Gravatar:

  "email_hash": {
    "description": "email hash, suitable for fetching a gravatar",
    "values": "string"
  },
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .