Sign-in existing end user by sending an OTP code via SMS
Initiate a sign-in process by sending a One-Time Password (OTP) to an existing end user. Descope will generate and deliver the OTP code to the phone number specified. Sending multiple OTP codes (for example, when an end user tries to sign-in a second or third time) will invalidate any OTP code that has already been sent.
This endpoint will return an empty response object when it completes successfully. The endpoint will return a failure code if the phone number is not yet registered.
Next Steps
Verify the OTP code using the Verify OTP Code endpoint to complete the user sign-in process. After successfully verifying the code the end user will be signed-in.
See Also
- See The User Object for further details on how to identify users and their contact information such as email address and phone number.
- See User Login Options for further details on loginOptions.
- Use the Sign-Up endpoint to sign-up a new end user.
- Use the Sign-In with Auto Sign-up endpoint to create a single sign-up and sign-in flow, which will create a new end user if they are not already registered.
Endpoint Authentication
Use authorization bearer header with the following format:
Authorization: Bearer \<Project ID\>
Authorization
Authorization
RequiredBearer <token>
In: header
Request Body
loginId
string
loginOptions
object
providerId
string
ssoAppId
string
Status code | Description |
---|---|
200 | OK |