requestPasswordReset
const url = 'https://gymgym.club/api/auth/request-password-reset';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"email":"example","redirectTo":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://gymgym.club/api/auth/request-password-reset \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "email": "example", "redirectTo": "example" }'Send a password reset email to the user
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
The email address of the user to send a password reset email to
The URL to redirect the user to reset their password. If the token isn’t valid or expired, it’ll be redirected with a query parameter ?error=INVALID_TOKEN. If the token is valid, it’ll be redirected with a query parameter `?token=VALID_TOKEN
Examplegenerated
{ "email": "example", "redirectTo": "example"}Responses
Section titled “Responses”Success
object
Examplegenerated
{ "status": true, "message": "example"}Bad Request. Usually due to missing parameters, or invalid parameters.
object
Examplegenerated
{ "message": "example"}Unauthorized. Due to missing or invalid authentication.
object
Examplegenerated
{ "message": "example"}Forbidden. You do not have permission to access this resource or to perform this action.
object
Examplegenerated
{ "message": "example"}Not Found. The requested resource was not found.
object
Examplegenerated
{ "message": "example"}Too Many Requests. You have exceeded the rate limit. Try again later.
object
Examplegenerated
{ "message": "example"}Internal Server Error. This is a problem with the server that you cannot fix.
object
Examplegenerated
{ "message": "example"}