Versions Compared

Key

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

General Information

...

ServiceAPIMethod
urac/changeEmail/validateGET


Data Model: %Link to Data Model% UsersTokens

Workflow: %Link to Architecture Page%

...

NameSourceMandatoryTypeSpecial FormatDescription
 tokenBodyQueryYESStringN/A Generated by Urac and email to user after change email request is made.

 

Output

...

Valid Response

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

 

Invalid Response

Code Block
languagejs
titleError Response Sample
{
    "result":false,
    "errors":{
        "codes":[400406],
        "details":[
            {
                "code":400406,
                "message":"ProblemInvalid withor thetoken providedhas passwordexpired."
            }
        ]
    }
}



Error Codes


 

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


Example (CURL)

...

Request

Code Block
languagebash
titleCalling YOUR API
 > CURL -X POSTGET http://127.0.0.1:4000/.../urac/changeEmail/validate?token=abcdef

Response

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