Skip to main content

User Avatar Management

Player’s avatar setup

Request URL

POST http(s)://API_URL/v2/app/users/:userId/avatar?clientId=[CLIENT_ID]

Request header (HTTP Header)

Parameter NameDescriptionOptional / Mandatory
signRequest signatureMandatory

Request parameters

Parameter NameDescriptionOptional / Mandatory
clientIdCasino identifier. Sent in the request lineMandatory
userIdUser identifierMandatory
avatarAvatar file. The file size should not exceed 20Mb.Optional
avatarUrlLink to the player’s avatar for uploadOptional

Response parameters

If the value of avatarUrl parameter was sent, the avatar must be uploaded using this URL; otherwise, the avatar will be uploaded from the file sent in the avatar parameter.

Parameter NameDescriptionOptional / Mandatory
nameAvatar URLMandatory
typemime type of avatar fileMandatory
sizeFile sizeMandatory

Errors returned

HTTP CodeMessageDescription
400Not valid requestIncorrect request signature
404Player not foundUser with userId sent was not found
422Avatar and avatarUrl cannot be blankAt least one of the following parameters must be sent: avatar or avatarUrl
Only files with these extensions are allowed: png, jpgFile format is not supported for upload
By URL is not a imageThe file sent as avatarUrl is not an image file
URL not availableThe avatarUrl sent is not available
413Request Entity Too LargeThe maximum file size is exceeded

Example of response

{
"data": {
"id": "123456",
"type": "avatar",
"attributes": {
"name": "/avatars/123456.png",
"type": "image/png",
"size": 169976
}
}
}