Image

Get Gravatar Avatar

0calls
2 credits / call

Provides stable and easy-to-use avatar retrieval capability, suitable for directly displaying avatars on web pages or in applications.

GET
uapis.cn
/api/v1/avatar/gravatar
Query parameters
5
email
string

User's Email address. If hash parameter is not provided, this parameter is required.

hash
string

Lowercase MD5 hash of user's Email address. If this parameter is provided, the email parameter will be ignored.

s
integer

Avatar size, in pixels. Valid range is 1 to 2048.

d
string

Default avatar type displayed when user does not have their own Gravatar avatar. Optional values include mp, identicon, monsterid, wavatar, retro, robohash, blank, 404.

r
string

Avatar rating. Optional values: g, pg, r, x.

Query parameters

email
stringoptional

User's Email address. If hash parameter is not provided, this parameter is required.

hash
stringoptional

Lowercase MD5 hash of user's Email address. If this parameter is provided, the email parameter will be ignored.

s
integeroptional

Avatar size, in pixels. Valid range is 1 to 2048.

d
stringoptional

Default avatar type displayed when user does not have their own Gravatar avatar. Optional values include mp, identicon, monsterid, wavatar, retro, robohash, blank, 404.

r
stringoptional

Avatar rating. Optional values: g, pg, r, x.

Response

200 / OK

Successful response, returns image binary data.

image/*

400 / Bad Request

When neither email nor hash parameter is provided in the request.

JSON
{
  "code": "INVALID_PARAMETER",
  "message": "Request failed, must provide 'email' or 'hash' parameter."
}

404 / Not Found

When d=404 and the requested email or hash has no corresponding Gravatar avatar.

JSON
{
  "code": "AVATAR_NOT_FOUND",
  "message": "The specified Gravatar avatar does not exist"
}