Skip to main content

ForgotPassword

Request password initialization

Description

  • Request the password initialization process without logging in. If the corresponding email address exists, a password change URL will be sent.
  • If you wish to use a Sendgrid email template specific to your system, please contact Hexabase in advance with the necessary information.
  • You can use your Sendgrid email template by specifying the email_templates_id issued by Hexabase.

Method

POST

Request URL Format

/api/v0/users/password/forgot

Payload

{
"email":"パスワードをリセットしたいユーザーのemail", //Required
"sender_address": "[email protected]", // (Optional) Specify if you want to change the from of the email to any value.
"host": "", // (Conditionally required) Specifies the host name to be used for the URL linked to in the email. If omitted, the Hexabase Management UI is specified. Implementation example = `https://${window.location.host}` (When moving to the page prepared in the SPA UI, If email_templates_id is not specified, it is required.
"root_path": "(reset_password に相当する部分のURL内のパス)" , // (Optional)
"query_params": "(一意キーの後続くGETパラメータを指定)", // (Optional) ? Specify after
"email_templates_id" : "5fb205b03545feade82dxxxx", // (Conditionally Required) Set this option if you wish to use the Sendgrid template for customers when sending invitation emails. Please contact Hexabase in advance and specify the email setup ID issued by Hexabase. If omitted, Hexabase's default password change screen will be used; if the host is not specified, this is required.
"exclusive_w_id": "624bea3a879f4e8d8b5dcc6c" // ((Optional) Specify the target workspace ID when the target is a workspace-only user.
}

Sample of URL and Payload in email

Request URL Sample

POST https://api.xxx.com/api/v0/users/password/forgot

Payload

default

{
"email": "[email protected]"
}

Redirects to the destination indicated by the link generated in the email sent (xxxxxxxx... is a temporarily generated unique ID)

https://app.hexabase.com/reset_password/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

For example, if you specify the following:

{
"email": "[email protected]",
"host": `https://${window.location.host}`,
"root_path": "pwd_reset" ,
"query_params": "param1=AAA&param2=BBB"
}

The redirect destination changes as follows: (If the hostname of the front-end APP is myapp.sample-spa.com)

https://myapp.sample-spa.com/pwd_reset/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx?param1=AAA&param2=BBB

This makes it possible to pass the necessary parameters to the password reset screen.

Response Sample

{
"valid_email": true //Whether there is an email that you want to initialize the password.
}