Access and Authentication
This section explains the steps to generate an authorization token and use the existing Automation Platform API’s.
Authorization Token
To access any data from the Automation Platform API’s, you need to generate an authorization token.
Home >> Settings >> Miscellaneous Settings >> API Configuration
To create a new token:
Navigate to Miscellaneous Settings > API Configuration
Here, you can find below required details :-
a. API Client ID
b. API Secret Key
Now, proceed with a POST request. Use below URL (with your information) to generate a token.
Request URL
https://yourdomainname.com/api/v2/auth/token
Request Headers
cache-control: no-cache |
Parameters
Name | Data Type | Required/Optional | Description | Example |
grant_type | Char | Required | grant type for generating token | client_credentials |
client_id | Varchar | Required | API Client ID | james-126698165 |
client_secret | Varchar | Required | API Secret Key | 5a263c8fe3ba572ef5c7d6f3780061c6a8e941aa1c4d12e99add0c9ad |
Response
Returns a JSON response containing below details :
( Below displayed response is after decoding JSON )
Array
(
[auth_type] => JSON WEB TOKEN
[token_type] => Bearer
[expires_in] => 3600
[access_token] => eyJ0eXAiOiJKV1hbGciOiJTSEEyNTYifQ.eyJwYXJ0bmVyX2lkIjlhdCI6MTU2NDU2NDU4MiwiZXhwIjoxNTY0NTY4MTgyLCJpZCI6Im5pdGVzaC0xMjY2OTgxMzY1IiwidmVyIjoiMS4wIiwibmJmIjoxNTY0NTY0NTgyfQ.WJBwaZZlGwFlh33-cLYA-ouP6Vr9QCIjJhIahUYeDxLvyTtVaD3Y44duC_2ND0vuvVEqBv-eGe7B5iJ_zOxS-CcJDj8tEd7MKjV0ams5ZsaQHZ3jbBkQ_GKecz1tNe1o6456Awpyw34kgJHliexiYGspt5r_GUJ6PlmDHD5hOB5LCaRivaIMQBLg-gPXTdDGqNnZ593U-ZWft-KbgqOIOfPE6s-6ZIFG4C51BxVB0h2s7WGFGgrdd_icngIpePIQ4HxHkB3B6_-53hJRePdQtZnOV0afcWWippU2BbcxHtoVISxqHk1b1B1UCpq67_Nn4AwMVmAdiNSnNw
) |
In case of any error, an error code key with value along with an error message will be returned.