Get My Profile Picture

GET /v1/user/avatar

Your profile picture, as a JPEG image (not JSON): a square of at most 256 pixels. ngris shows it beside your name, to the people in your accounts and on your support tickets.

Pass the avatar_version from My Profile as v: a request for the current version may be cached for a day.

Query parameters

v string
The picture's version (avatar_version). Optional.

Response (200 OK)

Content-Type header
image/jpeg.
Cache-Control header
private, max-age=86400 when v is the current version, else private, no-cache.
ETag header
The picture's version, quoted. Send it back as If-None-Match to get 304 Not Modified while it is unchanged.

Errors

401 Unauthorized
Missing or invalid auth.
404 Not Found
No profile picture: you have none.
Request
curl "https://api.ngris.com/v1/user/avatar?v=3f9a1c07d2b84e65" \ -H "X-API-KEY: <your_api_key>" \ -o picture.jpg
Response
200 OK Content-Type: image/jpeg Cache-Control: private, max-age=86400 ETag: "3f9a1c07d2b84e65" (the JPEG image)
Was this helpful?
On this page
Get My Profile Picture
Was this helpful?