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 25 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 after one hour of idle time (i.e. one hour of not using the token)

 

Resource URL

Parameters

Name

Type

Description

username

(mandatory)

String

The username that should be used to login.

password

(mandatory)

String

The password that should be used to login.

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"
    }
}

POST authentication/token/release

Available from CRM.COM R10.0.0

This method releases an authentication token in order to make it not usable by any other subsequent Web API calls

Token expires every one (1) hour and a new one will need to be retrieved. It is recommended to release tokens if there are not needed any more

Resource URL

Parameters

Name

Type

Description

token

(mandatory)

String

The authentication token which will be released

Response Data

Not applicable

Examples

 Example 1

HTTP Method: POST

 Request:

 

Post Data:

 {
  "token":"{{token}}"
}

Response:

 {
  "status": {
    "message": "",
    "description": "",
    "code": "OK"
  },
  "data": {}
}

POST authentication/web_api_key/token

Available from CRM.COM R10.0.0

This method returns an authentication token which can subsequently be used by all other Web API method to access the system. Note that the authentication token expires after two hours. 

Token expires after two hours, regardless of if the token is used or not, and a new one should be retrieved

Resource URL

Parameters

Name

Type

Description

keyStringThe key should be passed via HTTP Basic Authas the basic auth username. The basic auth password should be left empty

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 access CRM.COM. The token expires after two hours

Examples

 Example 1

HTTP Method: POST

 Request:

Headers:

KeyValueComments
Content-Typeapplication/json 
AuthorizationBasic RUU3M0MwQUU2NDUyNDM3MUI1RERFRkY1RjdCQjIxOTI6Note that the Web API key for this example is EE73C0AE64524371B5DDEFF5F7BB2192, which is encrypted and set as the authorisation parameter based on the  HTTP Basic Auth protocol

 

Post Data:

{
 
}

Response:

 {
  "data": {
    "token": "1351195444"
  },
  "status": {
    "code": "OK",
    "description": "",
    "message": ""
  }
}
  • No labels