Xsolla-logo

Auth by username and password

post/login

Authenticates the user by the username/email and password specified.

Request
query Parameters
projectId
required
string <uuid>

Login project ID from Publisher Account.

login_url
string

URL to redirect the user to after account confirmation, successful authentication, two-factor authentication configuration, or password reset confirmation. Must be identical to the Callback URL specified in the URL block of Publisher Account. To find it, go to Login > your Login project > General settings. Required if there are several Callback URLs.

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
username
required
string

Username or email address.

password
required
string

User password.

remember_me
boolean

Whether the user agrees to save the authentication data. Default is false.

Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

Request samples
application/json
{
  • "password": "password123",
  • "remember_me": false,
  • "username": "John"
}
Response samples
application/json