Skip to main content
POST
/
auth
/
forgotpassword
Forgot password
curl --request POST \
  --url https://server26-dot-royalti-project.uc.r.appspot.com/auth/forgotpassword \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "jsmith@example.com",
  "redirect_url": "<string>"
}'
{
  "message": "Successful, Password reset code sent to users email",
  "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjA5NDExZGQ5LTQxNzYtNGRhMC1hZDA2LTk1MjdhNTIzZmE1ZSIsImVtYWlsIjoibW9sdW5vcmljaGllQGdtYWlsLmNvbSIsInJvbGUiOiJhcnRpc3QiLCJpYXQiOjE2Njk2OTM2MTEsImV4cCI6MTY2OTcxNTIxMX0.KmJDppTUIfaSy5SzwKcW8fjiJKY9dx9kYaX-0c4jcn8"
}
/auth/forgotpassword Description:
The /auth/forgotpassword endpoint allows users to initiate the process of resetting their password by providing their email address. An optional redirect URL can also be provided to redirect users after initiating the password reset process.
Method:
POST
Request Payload:
ParameterTypeDescription
emailstringThe email address of the user.
redirect_url (Optional)stringThe URL to redirect the user to after initiating the password reset process.
Response Returns JWT token on success, should be used as bearer authorization token when calling /resetpassword
See examples below

Authentication

This endpoint requires authentication. Include your bearer token in the Authorization header.

Request Body

Request Schema

FieldTypeRequiredDescription
emailstringāœ…The email address of the user
redirect_urlstringāŒThe URL to redirect the user to after initiating the password reset process

Responses

āœ… 200 - Success

āš ļø 401 - Unauthorized

āš ļø 404 - Not Found

āŒ 500 - Internal Server Error

Tags

Auth

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Body

application/json
email
string<email>
required

The email address of the user

redirect_url
string

The URL to redirect the user to after initiating the password reset process

Response

Success

message
string
access_token
string
⌘I