Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

REQUEST

This API is used to reset the password for the user. You can call this API without the header.

The structure of API as below:

POST/auth/reset_email

BODY

You have to put the email name of the user into the body of API. The Credential includes the Username and Password of the User..

See example as below:

Code Block
{
  "name": "string"
}

JSON RESPONSE

There is message return as JSON format. It will return the result of API and the related information as well.

If you provide correct name, the server will return code 200 with a message as below:

Code Block
{
   "success": true
}

 

If you provide the incorrect name, the server will check and see there is no user in system then return code 404 with a message See example as below:

Code Block
{
	"password   "error_type": "string",
	"email_or_not_found_error",
   "success": false
}

 

If you don't input anything in the body or missing any fields, It will return code 400 and message as below:

Code Block
{
   "error_type": "validation_error",
   "success": false,
   "errors": [   {
      "name": "string"
}["Missing data for required field."]
   }]
}
Panel

On this page:

Table of Contents

EXAMPLE

We will know more about the API through the example below:

Request

I will call API to reset password as below:

Code Block
curl \
-X POST -d "{ \"name\": \"Dang\"}" \
"http://88.99.175.131:8000/v1/auth/reset_email"
 

Response

Code Block
{
	"success": true
}