Xsolla-logo

Grant entitlement (admin)

post/v2/project/{project_id}/admin/entitlement/grant

Grants entitlement to user.

Attention

Game codes or games for DRM free platform can be granted only.
SecurityXsollaLoginUserJWT
Request
path Parameters
project_id
required
integer

Project ID.

Example: 44056
Request Body schema: application/json
user_external_id
required
string

Unique user identifier.

required
object

Object with game properties.

required
object

Object with DRM properties.

mode
required
string

What type of entitlements should be granted. If the parameter is set to sandbox, the entitlement will be granted to the user in the sandbox mode. If the parameter is set to default, the entitlement will be granted to the user in the live mode.

Enum: "default" "sandbox"
code
string or null

Game code of the game.

user_country
string or null

User's country.

Responses
200

Entitlement was granted.

403

Authorization header not sent.

404

Game code not found. Make sure the code and project_id are correct.

422

Invalid request.

Request samples
application/json
{
  • "user_external_id": "user-external-id",
  • "game": {
    },
  • "drm": {
    },
  • "code": "AAAA-BBBB-CCCC-DDDD",
  • "mode": "default",
  • "user_country": "US"
}
Response samples
application/json
{
  • "statusCode": 403,
  • "errorCode": 0,
  • "errorMessage": "Authorization header not sent"
}