Versions Compared

Key

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

General Information

...

Service

API

Method

Data Models

Workflow

urac

/emailToken

GET

Users

N/A

Description

This API resets the password of an account if forgotten by providing the user (username or email)is very useful is the user status is pendingNew or pendingJoin and the initial email token has expired and needs a new one.

Input

...

Code Block
Type: application/json

Name

Source

Mandatory

Type

Special Format

Description

username

Query

YES

String

N/AUsername

username can be (userName or email)


Output

...

Response

SOAJS has a unified response. Check out this link to understand more the schema of SOAJS response 

Valid Response

Code Block
//If pendingJoin
{
	"result": true,
	"data": {
		"id": "5e46e5698e9d9aa766e04528",
		"token": "26cb932f-784d-47af-8fe7-4813e13ea4f4",
		"link": {
			"join": "http://dashboard.soajs.org:80/#/join/validate?token=26cb932f-784d-47af-8fe7-4813e13ea4f4"
		}
	}
}

//If pendingNew
{
	"result": true,
	"data": {
		"id": "5e46e5698e9d9aa766e04528",
		"token": "2fc6aef0-1aa7-4f99-aa3a-5f3cb0961633",
		"link": {
			"addUser": "http://dashboard.soajs.org:80/#/setNewPassword?token=2fc6aef0-1aa7-4f99-aa3a-5f3cb0961633"
		}
	}
}

Invalid Response

Code Block
{
	"result": false,
	"errors": {
		"codes": [520],
		"details": [{
			"code": 520,
			"message": "Unable to find user."
		}]
	}
}

Response schema

Follow this link to check out the response JSON Schema

...