...
Service | API | Method |
---|
urac | /resetPassword | POST |
Data Model: %Link to Data Model% Users, Tokens
Workflow: %Link to Architecture Page%
...
Name | Source | Mandatory | Type | Special Format | Description |
---|
token | Query | YES | String | N/A | Generated by Urac and email to user after forgot password request is made. |
password | Body | YES | String | N/A | |
confirmation | Body | YES | String | N/A | same value as password |
Output
...
Valid Response
Code Block |
---|
language | js |
---|
title | Valid Response Sample |
---|
|
{
"result": true,
"data": {
"..."
}
} |
...
Code Block |
---|
language | js |
---|
title | Error 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
400 | Database Error |
---|
406 | Invalid or token has expired. |
407 | Problem validating Request. Please try again. |
408 | The password and its confirmation do not match |
Example (CURL)
...
Request
Code Block |
---|
language | bash |
---|
title | Calling YOUR resetPassword API |
---|
|
> CURL -X POST http://127.0.0.1:4000/...resetPassword?token=abcdef -d 'password=johnpassword&confirmation=johnpassword' |
Response
Code Block |
---|
language | js |
---|
title | YOUR resetPassword API response |
---|
|
{
"result": true,
"data": {
"_id": "57063608622c47b5c097d19b",
"..."
}
} |