Versions Compared

Key

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

General Information

...

ServiceAPIMethod
urac/resetPasswordPOST


Data Model: %Link to Data Model% UsersTokens

Workflow: %Link to Architecture Page%

...

 
NameSourceMandatoryTypeSpecial FormatDescription
tokenQueryYESStringN/AGenerated by Urac and email to user after forgot password request is made.
passwordBodyYESStringN/A 
confirmationBodyYESStringN/Asame value as password

 

Output

...

Valid Response

Code Block
languagejs
titleValid Response Sample
{
	"result": true,
	"data": {
		"..."	
	}
}

...

Code Block
languagejs
titleError Response Sample
{
    "result":false,
    "errors":{
        "codes":[400408],
        "details":[
            {
                "code":400408,
                "message":"Problem with the provided passwordThe password and its confirmation do not match"
            }
        ]
    }
}



Error Codes


 

Code
Description
400Database Error
406Invalid or token has expired.
407Problem validating Request. Please try again.
408The password and its confirmation do not match



Example (CURL)

...

Request

Code Block
languagebash
titleCalling YOUR resetPassword API
 > CURL -X POST http://127.0.0.1:4000/...resetPassword?token=abcdef -d 'password=johnpassword&confirmation=johnpassword'

Response

Code Block
languagejs
titleYOUR resetPassword API response
{
	"result": true,
	"data": {
		"_id": "57063608622c47b5c097d19b",
		"..."
	}
}