Auth Integration - Forgot Password
In case the user can login from within the FastEditor, there should also be a way for the user to request its password in case it's forgotten.
Endpoint
The endpoints for this request (for staging/production environments) should be provided by you and shared with your account manager at FastEditor.
Authorization
When sending the login request to your endpoint, we will add the X-Api-Key
header to the request so you can verify the sender. The value of this X-Api-Key
will be shared by your account manager on start start of the integration process.
Request
This request body is a JSON objects with the following parameters:
Parameter | Required | Description | Data Type | Example |
---|---|---|---|---|
userName | Yes | The username (usually the email address) the user choose to create the account with | string | hello@login.com |
language | Yes | The language in which FastEditor is shown to the user. This can be used to send localized emails or save to the user's account | string | nl en en-gb |
Example Request
Below an example request to your login endpoint:
curl --location
--request POST 'https://yourapidomain.com/your_pw_forgotten_endpoint' \
--header 'X-Api-Key: ************* ' \
--header 'Content-Type: application/json' \
--data-raw '{
"userName": "hello@login.com"
}'
Success Response
Your endpoint should return a 201 response with the following JSON body. These values will be shown to the user in a modal dialog. You can include either a success message or a failure message (ie. the user is unknown).
{
"header": "Email sent",
"body": "Password reset request received successfully. Please check your email for instructions."
}
Error response
In case something is wrong, you should return a status code in the 400 or 500 range. If you want to show a message to the user in the application, it should return JSON in the following format:
{
"message": "This is the error message I want to show to the user",
"code": "Optional error code that could be used to handle specific cases"
}
###