Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Authenticates an account by checking whether, for example, entered username and password matches the data in the database, or a specific account on a social media is registered in the database.


Endpoint ID:2001
Method:POST
URL:

/user/authenticate

Request body:

JSON data with type of authentication (native or Facebook) along with data specific to type of authentication.

Required fields:
 authType “native”:

loginID

password

 authType “facebook”:

appID (Facebook AppID)

userID

updatedAccessToken

accessTokenExpires (UTC timestamp for when the access token expires)

Example 1 – Native authentication:
{
	"authType": "native",
	"loginID": "mailbox@mailserver.com",
	"password": "password"
}
Example 2 – Facebook authentication:
{
	"authType": "facebook"
	"appID": 987654321,
	"userID": 123456789,
	"updatedAccessToken": "...",
	"accessTokenExpires": "..."
}

Response body:

JSON data with key(s) for successfully authenticated account. The result will always hold the dialogportal™ master key and if the app making the request is configured to use a specific external key, this key is also included in the response. If authentication fails, the result is empty

See 1001: Create account for example data

Status codes:200

Successfully authenticated

 403

Invalid login

The following sub codes may be returned:

403.1Unknown loginID
403.2User has not been verified
403.3User is not active
403.4Incorrect password
403.7Facebook appID not recognised
403.8Facebook connection does not exist
403.9The Facebook userID was found but the connection does not have a dpKey
  • No labels