curl --request POST \
--url https://api.royalti.io/auth/forgotpassword \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "[email protected]",
"redirect_url": "<string>"
}
'{
"message": "Successful, Password reset code sent to users email",
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjA5NDExZGQ5LTQxNzYtNGRhMC1hZDA2LTk1MjdhNTIzZmE1ZSIsImVtYWlsIjoibW9sdW5vcmljaGllQGdtYWlsLmNvbSIsInJvbGUiOiJhcnRpc3QiLCJpYXQiOjE2Njk2OTM2MTEsImV4cCI6MTY2OTcxNTIxMX0.KmJDppTUIfaSy5SzwKcW8fjiJKY9dx9kYaX-0c4jcn8"
}/auth/forgotpassword
curl --request POST \
--url https://api.royalti.io/auth/forgotpassword \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "[email protected]",
"redirect_url": "<string>"
}
'{
"message": "Successful, Password reset code sent to users email",
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjA5NDExZGQ5LTQxNzYtNGRhMC1hZDA2LTk1MjdhNTIzZmE1ZSIsImVtYWlsIjoibW9sdW5vcmljaGllQGdtYWlsLmNvbSIsInJvbGUiOiJhcnRpc3QiLCJpYXQiOjE2Njk2OTM2MTEsImV4cCI6MTY2OTcxNTIxMX0.KmJDppTUIfaSy5SzwKcW8fjiJKY9dx9kYaX-0c4jcn8"
}POST
Request Payload:
| Parameter | Type | Description |
|---|---|---|
| string | The email address of the user. | |
| redirect_url (Optional) | string | The URL to redirect the user to after initiating the password reset process. |
/resetpassword
See examples below
const response = await fetch('https://api.royalti.io/auth/forgotpassword', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
"email": "sample-email",
"redirect_url": "sample-redirect_url"
})
});
const data = await response.json();
console.log(data);
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"