4

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

2 Answers 2

17

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.

3
  • Or, include the size to get a larger icon: ?s=128&d=identicon&r=PG Commented May 22, 2010 at 21:57
  • r=PG ? or r=G ? Commented Nov 1, 2010 at 15:54
  • That's up to you. ;) Commented Jan 21, 2011 at 21:19
3

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"
  },

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.