curl --request PATCH \
--url https://api.royalti.io/auth/resetpassword \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "[email protected]",
"new_password": "<string>"
}
'{
"message": "Password Reset Successful"
}/auth/resetpassword
curl --request PATCH \
--url https://api.royalti.io/auth/resetpassword \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "[email protected]",
"new_password": "<string>"
}
'{
"message": "Password Reset Successful"
}PATCH
Query Parameter:
| Parameter | Type | Description |
|---|---|---|
| code | string | The verification code sent to the user’s email. |
| Parameter | Type | Description |
|---|---|---|
| string | The email address of the user. | |
| new_password | string | The new password to be set. |
/forgotpassword request
See example of the responses below
const response = await fetch('https://api.royalti.io/auth/resetpassword', {
method: 'PATCH',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"email": "sample-email",
"new_password": "sample-new_password"
})
});
const data = await response.json();
console.log(data);
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
The verification code sent to the user's email
Success - If Logged In