Forgot Password
This API enables you to send a password reset email to the user based on the EmailAddress (registered email address) posted in the JSON body.
Alternatively, you can pass the “SearchKeyData” property and include the “SchemaName” and “Value” of any unique lead field. A password reset email will be sent to the email address associated with the lead that matches the “SearchKeyData”.
{ "SearchKeyData":{ "SchemaName":"Phone", "Value":"+14-157415569" } }
If you want to send the password reset link to a phone or an alternative email, along with the “SearchKeyData”, also pass the “RecipientField” property and include the “SchemaName” of the field you want to send the link to. The field must be of data type phone or email.
{ "SearchKeyData":{ "SchemaName":"Phone", "Value":"+14-157415569" }, "RecipientField":{ "SchemaName":"Phone" } }
Both the LeadId and TemporaryPassword received from the reset email when this API is triggered (read the URL in the reset email for these parameters) must be passed in the Reset Password API to create a new password.
API Headers
Pass the following mandatory headers:
- The public authentication key you receive from the Get Public Auth Key API response.
- For example, Authorization = <Your Auth Key>
- The registration token you received Get Portal Registration Token API response.
- For example, x-lsq-registertoken = <registration token>
- The portal Id. This specifies which portal to register the user on.
- For example, x-lsq-portalid = <portal id>
Here’s an example of the forgot password functionality in a sample portal. When users enter their email address, an email is sent with a reset password link. You can configure the contents of the reset email on the Manage Portals Settings page.
API URL
Request
Content-Type: application/json{ "EmailAddress": "johnwick@example.com" }
Request Parameters
Parameter | Description |
---|---|
EmailAddress | Pass the user’s registered email address. |
Response
{ "Status":"Success", "Message":"Reset link sent successfully" }
HTTP Response Codes
Code | Description |
---|---|
200 OK | This is the status code for successful API call. |
401 Unauthorized | The API call was made with invalid access credentials. Check your AccessKey and SecretKey. |
400 Bad Request | The message body on the request is not as per API specification. Make sure that content type is set to “application/json” and the JSON body has correct attribute names and structure. |
404 Not Found | The API could not be found. Please check the API signature. |
429 Too Many Requests | API calls exceeded the limit of 25 in 5 second(s) |
500 Internal Server Error | The API called failed. There could be many reasons for it. Check the exception message to get more details. |