Versions Compared

Key

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

General Information

...

ServiceAPIMethod
urac/forgotPasswordGET


Data Models:   UsersTokens

Workflow: Forgot Password Flow

Input

...

Type: application/json
NameSourceMandatoryTypeSpecial FormatDescription
usernameQueryYESStringN/AUsername or Email

...


Output

...

Valid Response

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

 


Invalid Response

Code Block
languagejs
titleError Response Sample
{
    "result":false,
    "errors":{
        "codes":[406],
        "details":[
            {
                "code":406,
                "message":"Invalid or token has expired."
            }
        ]
    }
}



Error Codes



 

Code
Description
406Invalid or token has expired.
407Problem validating Request. Please try again.



Example (CURL)

...

Request

Code Block
languagebash
titleCalling Forgot Password API
 > CURL -X GET http://127.0.0.1:4000/urac/forgotPassword?username=john

...

Code Block
languagejs
titleForgot Password API response
{
	"result": true,
	"data": { token: '18c24bd2-63db-4191-bd1c-4111d68f96f9',
  link: "819b0aed-edd8-47d5-ada0-9e5f93cb8248"
   { forgotPassword: 'http://dashboard.soajs.org/#/resetPassword?token=18c24bd2-63db-4191-bd1c-4111d68f96f9' } }
}