Xsolla-logo

Grant game achievements to user

post/users/me/achievements/grant

Grants list of specified game achievements to user on the client side.

SecurityBearer
Request
Request Body schema: application/json
achievements
required
Array of strings <= 10 items

List of achievement codes for granting to the user.

game_id
required
integer

Game ID which the achievement belongs to.

Responses
204

No Content

400

(Bad Request) Invalid request parameters

403

Authentication token is invalid

422

parameters sent to the server are incorrect

429

(Too Many Requests) Too many requests are sent during the rate limit period

Request samples
application/json
{
  • "achievements": [
    ],
  • "game_id": 0
}
Response samples
application/json
{
  • "error_code": "1904-0001",
  • "error_description": "Parameter game_id missed."
}