Get Avatar Suggestion

Prev Next
Get
/api/v1/users.getAvatarSuggestion

Use this endpoint to get suggestions for your workspace avatar image. The endpoint may return an empty string if no images associated with your email ID are found.

Gravatar suggestions are deprecated since Rocket.Chat 8.9.0 and will be removed in Rocket.Chat 9.0.0. After that, the response will only include avatars from OAuth services.

Header parameters
X-Auth-Token
stringRequired

The authenticated user token.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired

The authenticated user ID.

ExamplerbAXPnMktTFbNpwtJ
Responses
200

OK

Example 1
{
  "suggestions": {
    "gravatar": {
      "service": "gravatar",
      "url": "https://s.gravatar.com/avatar/6da0187ff0de738a86a62b0e9e34ffbf?default=404&size=200",
      "blob": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAgAElEQVR42my9y49k2ZHm9zM75153j8jIjMysyqxKVrGKZJNsstjvbrTUg1bPQAIaGgkYCCMtpIWglTba6g+YP0CA/gBBO61moYUEYQRpMNBooWlyptmcLrJZZFXWu/L9iqe733uOmRZ27nWP4hSQiKjMCPfr955j9tn3fWZHfvCX/8iTLhA6/vCHP+TenWOuHR5Rxy0",
      "contentType": "image/png"
    }
  },
  "success": true
}
Expand All
object
suggestions
object
gravatar
object
service
string
url
string
blob
string
contentType
string
success
boolean
401

Unauthorized

Authorization Error
{
  "status": "error",
  "message": "You must be logged in to do this."
}
object
status
string
message
string