Xsolla-logo

Create user token

post/v2/project/{project_id}/distribution_hub/user/auth

Verifies that a user exists in the game and creates a user token.

SecuritybasicAuth
Request
path Parameters
project_id
required
integer

Project ID.

Example: 44056
Request Body schema: application/json
required
object
email
required
string

The user's email address where he can receive the purchased game key.

id
string or null

Unique user identifier in the game.

ip
string or null

The user's IP address.

phone
string or null

The user's phone number.

name
string or null

The user's public name.

country
string or null

Two-letter uppercase country code per ISO 3166-1 alpha-2.

Responses
200

User token successfully received.

Request samples
application/json
{
  • "user": {
    }
}
Response samples
application/json
{
  • "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}