Set new password
The endpoint is designed for setting a new password after confirming the password reset for a mobile device.
Before using this endpoint, it is recommended to first request a password reset using the endpoint POST /v2/mobile/password/reset.This endpoint provides the ability to reset a user's password. After requesting a password reset, the request should be confirmed using an SMS code through the endpoint POST /v2/mobile/password/reset/confirm/code.This endpoint is used to verify the SMS code associated with the password reset process for a mobile device.
After confirming the phone number or after user authorization, you will receive an access_token. You need to enter this access_token in the
Token
field.
Required Headers Parameters и Body Parameters:
Use the X-Merchant-ID provided to you by your account manager.
Request Sample: cURL
At the time of sending the request, the curl command should be as follows:
curl --request POST \
--url https://api.vault.sandbox.testessential.net/v2/mobile/password/reset/confirm \
--header 'X-Merchant-ID: bece038f-2e46-49f4-b25e-89cd38d6dc16' \
--header 'X-Version: 1.2' \
--header 'accept: application/json' \
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI3NzQ3MmM5YS1lMmY3LTRhMWEtODFlNC03N2MxNTFiNzg1MTciLCJleHAiOjE3MTEwMzgzMjUsImlhdCI6MTcxMDk1MTkyNX0.b8ATi6SSiR7OJY0Mtx74YijSECtSXUwQ7Jbv3hL6eMU' \
--header 'content-type: application/json' \
--data '
{
"password": "12345Qwerty1234",
"phone": "+447873214567",
"code": "1234"
}
'
After entering the phone number and password into the respective fields, you need to click the Try It!
button.
This action initiates the process of sending data to the server and receiving a response from the API using the provided credentials.
Response Example
The response status code indicates that the request was successfully processed.
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIwNTFhYTc3Mi0yNDk4LTQ0ZTEtODdmYi0zYzNhZDdlMTY1ODgiLCJleHAiOjE3MDk4MDQzNjksImlhdCI6MTcwOTcxNzk2OX0.9nA1ur5_fGwlap2mrPN35OhR6dJ0M5qmNLNjJ2iZM6g",
"token_type": "bearer",
"refresh_token": "qPMkKwoedBu2lVZzn9-51hkG_vg",
"expires_in": 86399,
"scope": "read write",
"jti": "nejUZ1PeSBnmTtrZdaAj81sQX44"
}
Updated 7 months ago