# Get confirmation code Waits until the user follows the link provided via email or SMS and returns the confirmation code for authentication. If you sent this call and after 20 seconds you didn't get the code, there was an error. In this case, resend the call immediately. The code lifetime is 3 minutes. 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 or phone number (JWT or OAuth 2.0) request to the Xsolla Login server: a. If the parameter send_link is true, after this request, you should send this same request to make email or SMS 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 an email or SMS to the user 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 the Complete auth by email or phone number (JWT or OAuth 2.0) request with the received ID to the Xsolla Login server. 8. The user is considered as authorized. Endpoint: GET /otc/code Version: v1 ## Query parameters: - `projectId` (string, required) Login project ID from Publisher Account. - `login` (string, required) Login identifier of the user. Can be either an email address or phone number. - `operation_id` (string, required) ID of the confirmation code. You can find its value in the response to a previous request. ## Response 200 fields (application/json): - `code` (string, required) Confirmation code. ## Response 408 fields (application/json): - `error` (object, required) - `error.code` (string, required) Error code. Example: "003-061" - `error.description` (string, required) Error description. Example: "Object not found." - `error.details` (object) Additional information. ## Response 429 fields (application/json): - `error` (object, required) - `error.code` (string, required) Error code. Example: "003-061" - `error.description` (string, required) Error description. Example: "Object not found." - `error.details` (object) Additional information.