# [JWT] Start auth by email Starts authentication by the user email address and sends a confirmation code to their email address. The code lifetime is 3 minutes. This call is used only with the Complete 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 this 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 linke. 7. The application sends the Complete auth by email request with the received ID to the Xsolla Login server. 8. The user is considered as authorized. Endpoint: POST /login/email/request Version: v1 ## Query parameters: - `projectId` (string, required) 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. For the scenario of a login error, the value should be identical to the the Error callback URL specified in the URL block of Publisher Account. To find the settings, go to Login > your Login project and select the Callback URLs section in the upper block. 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. Recommended maximum length less than 500 characters. Note, that this parameter is only available if you use a custom user data storage. - `with_logout` (string) 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 fields (application/json): - `email` (string, required) User email address. - `link_url` (string) URL to redirect the user to the status authentication page. Required if the parameter send_link is true. - `send_link` (boolean) Shows whether a link is sent with the confirmation code in the email or not. The link can be used instead of the confirmation code to log in. If the parameter has the true value, the link is sent in the email. ## Response 200 fields (application/json): - `operation_id` (string, required) ID of the confirmation code. ## 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. ## Response 400 fields