Versions Compared

Key

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

...

...

...

...

...

...

...

...

...

...

...

...

...

...


Tip

Available from CRM.COM R15.0.0


Excerpt

This method returns an authentication token, which can subsequently be used by all other Web API methods to access the system and retrieve data that are owned only by the consumer that was identified through the provided access token

...

Note

The Authentication Token expires after two hours, regardless of if the token is used or not, and a new one should be retrieved. The token is returned in JWT structure and the length of the token will be more that 32 characters

More information for authenticating using Consumer Application Keys can be found in API Authentication

Resource URL

Parameters

Name

Type

Description

key

(mandatory on conditions)

String

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

Tip

For releases prior CRM.COM R16.2.0, this parameter is mandatory

From CRM.COM R16.2.0, this parameter is mandatory only if the Access Token is provided


jwt

(semi-optional and optional on conditions)

String

The authentication token returned by the CRM.COM Identity management system.

Tip

Available from CRM.COM R16.2.0 and onwards

If this parameter is specified, then only the organisation should be provided


access_token_identifier

(

mandatory

semi-optional and optional on conditions)

Access Token Identifier

The identifier of the access token that should be used during the authentication process. The allowed access token identifier fields are the following

Include Page
V4:access_token_identifier
V4:access_token_identifier

 
Tip

For releases prior CRM.COM R16.2.0, this parameter is mandatory


organisation

(mandatory on conditions)

String

The organization id on which the a session should be created

Tip

Available from CRM.COM R16.2.0 and onwards

Applicable and mandatory only if the JWT parameter is specified


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

Expand
titleExample 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

Code Block
languagejavascript
themeConfluence
languagejavascript
linenumberstrue
 {
	"access_token_identifier": { "authentication_code" : "p_kestora1!"},
	"unit":"1"
} 

 

Response

Code Block
languagejavascript
themeConfluencelanguagejavascript
linenumberstrue
 {
    "data": {
        "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJjaWkiOiIyNjk1RkVEM0ZDRkQ0MDg0QUIzOUY0NEIxODg4OTEyMyIsInVzciI6Im1heXRlbXBsYXRlIiwib3JnIjoicHNfZGV2IiwiYXJpIjoiMjYxQkYyQjc5MTk4NDAxRDg5QTc5QzU0NUYxNkNCRUMiLCJvdW4iOiIxIiwiZXhwIjoiMTUxODEwNDg2NCIsImlhdCI6IjE1MTgwOTc2NjQiLCJqdGkiOiJGNTg2QjI4ODA0OEE0MTAwQjc0OUU2MkY0N0RGQzg0NCJ9.yvRGqFy7dL2H6RcqXOJQtD3zBoWHUDpoRN9Ma6hKfpg"
    },
    "status": {
        "code": "OK",
        "description": "",
        "message": ""
    }
}