Xsolla-logo

Complete auth by email

post/oauth2/login/email/confirm

Completes authentication by the user email address and a confirmation code. The code lifetime is 3 minutes.

This call is used only with the Start auth by email call.

The workflow of using this call:

  1. The application opens an authentication form so the user can enter their email address.
  2. The user enters their email address.
  3. The application sends the Start auth by email request to the Xsolla Login server: a. If the parameter send_link is true, after this request, you should send the Get confirmation code request to make email contain the confirmation code and link. b. If the parameter send_link is false or not passed, the email will contain the confirmation code only.
  4. The Xsolla Login server sends the email and returns the ID of the confirmation code.
  5. The application shows a field so the user can fill in the confirmation code.
  6. The user enters the received confirmation code or follows the link.
  7. The application sends this request to the Xsolla Login server with the received ID.
  8. The user is considered as authorized.
Request
query Parameters
client_id
required
integer

Your application ID. Get it after creating an OAuth 2.0 client.

Request Body schema: application/json
code
required
string

Confirmation code.

email
required
string [ 1 .. 255 ] characters

User email address.

operation_id
required
string

ID of the confirmation code. You can find its value in the response to a previous request.

Responses
200

OK

400

Bad Request

401

Unauthorized

404

Not Found

422

Unprocessable Entity

429

Too Many Requests

Request samples
application/json
{
  • "code": "string",
  • "email": "string",
  • "operation_id": "string"
}
Response samples
application/json