Skip to end of banner
Go to start of banner

authentication

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 19 Next »

POST authentication/token

This method returns an authentication token which can subsequently be used by all other Web API method to access the system.

Token expires every one (1) hour and a new one will need to be retrieved

 

Resource URL

Parameters

Name

Type

Description

username

(mandatory on conditions)

String

The username that should be used to login. Username is mandatory unless an access token identifier is specified

password

(mandatory on conditions)

String

The password that should be used to login. Password is mandatory unless an access token identifier is specified

access_token_identifier

(optional)

Access Token identifier  

The identifier of the access token that should be used for authentication. Access token becomes mandatory if no username or password is specified. The allowed access token identifier fields are the following:

Name

Type

Description

authentication_code

(semi-optional)

String

The authentication code of the access token

identifier

(semi-optional)

StringThe identifier of the access token. If the identifier is specified then it will be validated against the specified pass code

pass_code

(mandatory on conditions)

StringThe pass code of the access token, which is applicable and mandatory if the identifier is specified

Available from CRM.COM R6.0.0

organisation

(mandatory)

String

The organization on which the user will login

unit

(optional)

String

The unit ID that the user will use during login. If not specified then the default unit for that user is used

Response Data

Name

Type

Description

token

String

The authentication token which can be used to login

Examples

 Example 1

HTTP Method: POST

 Request:

 

Post Data:

{
    "username": "mpadministrator",
    "password": "1234",
    "organisation": "CRMDEMO",
    "unit": "EE63A82C4FEBE02FF34E90DD1EBA5ABE"
}

Response:

{
    "status": {
        "code": "OK",
        "message": null,
        "description": null
    },
    "data": {
        "token": "4AD9C84FA60F9FE407140E20F707726A"
    }
}

 

 

  • No labels