Get Contact Avatar

Prev Next
Get
/avatar/contact/{contactId}
Premium tag

Return the avatar image for a personal contact. This route sits outside /api/v1, like user avatars.

Only the contact owner can fetch the image. Authenticate with rc_uid and rc_token as query parameters or cookies. Auth headers are not accepted.

If the contact has an uploaded avatar, that file is returned. Otherwise Rocket.Chat generates an SVG from the contact's displayName initials. Unknown contacts and contacts owned by another user return 404.

Changelog

Version Description
9.1.0 Added
Path parameters
contactId
stringRequired

Enter the contact ID.

Example690c2b2d4e7e8bcf6985b3d8
Query parameters
rc_uid
string

The user ID of the contact owner. Required unless provided as a cookie.

rc_token
string

The login token of the contact owner. Required unless provided as a cookie.

format
string

Optional image format for the generated fallback avatar: jpg, jpeg, or png. Defaults to SVG.

Examplepng
Responses
200

OK

string (binary)
string (binary)
string (binary)
304

Not Modified

404

Not Found