Skip to main content

Change Password

Endpoint

To resend the email verification link to the user, make a POST request to the following endpoint:

https://api.betatel.com/api/auth/change-password

Request Headers

The request must include an Authorization header with a valid JWT token for authentication:

HeaderValueRequiredDescription
Authorization{{access_token}}YesThe authentication token to verify the user's identity

Request Body

Your request should contain the password for the user:

{
"password": "NewPassword123456!"
}
ParamValueTypeRequiredDescription
passwordNewPassword123456!StringYesThe user's new password

Let’s Dive Into the Code!

Choose your preferred programming language and use the provided examples to integrate the login

Example - cURL
curl --location 'https://api.betatel.com/api/auth/change-password' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3ZWE2MjJiMDU1MjkzNWZhYzVjZDFhZCIsImVtYWlsIjoicG92aWQ2ODFAbm9rZG90LmNvbSIsInJvbGUiOiJ1c2VyIiwiaWF0IjoxNzQzNDI4Mjk3LCJleHAiOjE3NDM0MzE4OTd9.dS4w_GEw4jVoMm5pvv6uoYnC9TYGO3rAbUeRMxK1iow' \
--header 'Content-Type: application/json' \
--data '{
"password": "NewPassword123456!"
}'

Response

JSON Schema:

{
"message": "Password changed successfully"
}

🎉 Success – The Password Has Been Changed!

🔜 What’s Next? The user's password has now been successfully updated. You can proceed with other user management functionalities such as updating the user profile, handling login sessions with the new password, or securing the account with additional security measures like multi-factor authentication.