Skip to main content

getMemberPhoto

ThumbnailsDataWrapper getMemberPhoto(userId)

GET /api/2.0/people/{userId}/photo

Get a user photo

Returns the URLs of the avatar of a profile in every size the portal keeps: the original, the retina and the maximum variants, and the big, medium and small thumbnails. Unlike the operations that change an avatar, this one may be called for another account, as long as the caller is allowed to see that account - a guest, for instance, only sees the accounts it is related to. The call is read-only and always answers with a full set of URLs: a profile that has no avatar of its own gets the URLs of the default placeholder image rather than an empty answer. The URLs are portal paths meant to be requested directly and may be replaced when the avatar changes, so they should not be stored for a long time. To change the avatar use POST api/2.0/people/{userId}/photo for an uploaded file, PUT api/2.0/people/{userId}/photo for one taken from a URL, and DELETE api/2.0/people/{userId}/photo to drop it.

Parameters​

NameInTypeDescriptionNotes
userIdpathStringThe profile whose avatar the operation addresses, taken from the route. Either the ID of the account or its user name is accepted. Reading a photo works for any account the caller may see, while deleting one only works for the calling account itself.[required] [example: 00000000-0000-0000-0000-000000000000]

Responses​

Status codeDescriptionTypeResponse headers
200The URLs of the photo in every size, or of the default image when the profile has no photoThumbnailsDataWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
403The caller is not allowed to see the requested account--
404No user has the specified ID--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
400Bad Request.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

ThumbnailsDataWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json