post

/users/account/link

Links the platform account to the existing main account by the code.

Main account is the Xsolla Login project which other Xsolla Login projects (platform accounts) are linked to. Main and platform accounts are created in Publisher Account.

To link accounts, the game server uses this method with the response from the Create Сode for Linking Accounts request.

Method available with the server JWT in the X-SERVER-AUTHORIZATION header only. To get the server token, use the Generate User JWT method with grant_type=client_credentials.

Authorization

apiKey - X-SERVER-AUTHORIZATION

Request Body

Schema
object

Data for linking a platform account.

code
string

Code by which service links accounts.

3 validations + required
platform
string

Name of chosen Social Provider.

1 validation + required
project_id
string

Shadow Login ID from Publisher Account.

Shadow Login is a project which ID you do not need to pass to this method. Contact your Account Manager to set it up.

2 validations
publisher_project_id
integer

Project ID from Publisher Account which you make a request for.

If you specify it, but do not specify the project_id parameter, the service will be linked to its project_id. Contact your Account Manager to link project_id to publisher_project_id.

1 validation
user_id
string

User ID from Social Provider.

1 validation + required

Responses

Send a Test Request

Send requests directly from the browser (CORS must be enabled)
$$.env
1 variable not set
X-SERVER-AUTHORIZATION