Authorization
Descope Project ID:Refresh JWT Project ID:Refresh JWT as bearer token.
In: header
Request Body
application/json
falsefalseUpdate phone number of Existing User
Update the phone number of an existing end user by sending an OTP code to the new phone number. After successfully verifying the code the new phone number will be used to deliver new OTP messages via Voice. The bearer token requires both the ProjectId and refresh JWT in the format <Project ID>:<JWT>, and can therefore only be run for end users who are currently signed-in.
This endpoint will return an empty response object when it completes successfully.
Descope allows you to associating multiple login IDs for a user during API update calls. For details on how this feature works, please review the details here.
Next Steps
Verify the OTP code using the Verify OTP Code endpoint to complete the update process. After successfully verifying the code the newphone number will replace the original phone number.
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.
- Successful execution will return an empty body
- To try this endpoint - need to provide
Project ID:Refresh JWTas bearer. You can acquire the Session JWT by signing in the user and collecting it from the response.
curl -X POST "https://api.descope.com/v1/auth/otp/update/phone/voice" \ -H "Content-Type: application/json" \ -d '{}'{ "maskedPhone": "string", "verificationAttempts": 0}export interface Response {maskedPhone?: stringverificationAttempts?: number}Verify OTP Code POST
### Verify the validity of an OTP code via Voice Verify that the OTP code entered by the end user matches the OTP code that was sent. The Verify OTP code endpoint completes the OTP via Voice flow for: - [Sign-Up](/api/otp/phone/sign-up) - [Sign-In](/api/otp/phone/sign-in) - [Sign-In with Auto Sign-up](/api/otp/phone/sign-in-auto-sign-up) - [Update Phone](/api/otp/phone/update-phone) The response object includes the session JWT `sessionJwt` and refresh JWT `refreshJwt` when it completes successfully, and the end user will be signed in. For an update phone number flow, the new phone number will replace the original phone number. ### See Also - See [The User Object](/api/overview#the-user-object) for further details on how to identify users and their contact information such as email address and phone number.
Magic Link Authentication API Overview
Use the Descope REST API to build magic link authentication for your application.