Xsolla-logo

Auth via access token of social network

post/social/{provider_name}/login_with_token

Authenticates the user with the access token using social network credentials.

Request
path Parameters
provider_name
required
string

Name of the social network connected to the Login in Publisher Account.

Can have the following values: facebook, google, linkedin, twitter, discord, naver, baidu, wechat, qq_mobile.

query Parameters
projectId
required
string <uuid>

Login project ID from Publisher Account.

payload
string

Your custom data. The value of the parameter will be returned in the payload claim of the user JWT.

with_logout
string
Default: "0"

Shows whether to deactivate the existing user JWT values and activate the one generated by this call. Can have the following values:

  • 1 to deactivate the existing values and activate a new one,
  • 0 to keep the existing values activated.
Request Body schema: application/json
access_token
required
string

Access token received from a social network.

access_token_secret
string

Parameter oauth_token_secret received from the authorization request. Required for Twitter only.

openid
string

Parameter openid received from a social network. Required for Wechat only.

Responses
200

OK

400

Bad Request

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

Request samples
application/json
{
  • "access_token": "string",
  • "access_token_secret": "string",
  • "openid": "string"
}
Response samples
application/json
{
  • "token": "EAAD0t5SolwEBAG8Jom6RkYL7qKfVY0rp8mH267bngfZAWF0J83MYn24xLrlVDQJ5mKfE1ir4FwW4HZC6TuJ35WfQtzx04U3jHvODSEXdk8JZA4bYZCsvNaVpxOJ9iZCEKTbUebUr21nQohsNFNPZAJvSoKlkkZBEgfXa4kaf5Y9awZDZD"
}