# [JWT] Complete auth by phone number Completes authentication by the user phone number and a confirmation code. The code lifetime is 3 minutes. This call is used only with the Start auth by phone number call. The workflow of using this call: 1. The application opens an authentication form so the user can enter their phone number. 2. The user enters their phone number. 3. The application sends the Start auth by phone number 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 SMS contain the confirmation code and link. b. If the parameter send_link is false or not passed, the SMS will contain the confirmation code only. 4. The Xsolla Login server sends the SMS 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. 8. The user is considered as authorized. Endpoint: POST /login/phone/confirm Version: v1 ## Query parameters: - `projectId` (string, required) Login project ID from Publisher Account. ## Request fields (application/json): - `code` (string, required) Confirmation code. - `operation_id` (string, required) ID of the confirmation code. - `phone_number` (string, required) User phone number. ## Response 200 fields (application/json): - `login_url` (string, required) URL with the token and remember_me parameters to redirect the user to after successful authentication. The token parameter has the user JWT format. Example: "http://someurl.com?token=XXXXXXX" ## Response 401 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 404 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 422 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.