Authentication

Authentication

All API requests require authentication via OAuth 2.0 Bearer Token. The client_id and client_secret is unique to each customer and will be provided by the MadConnect technical team. Clients have to request a new token on expiry of the existing access token.

Get Access Token

POST /es/v2/oauth/client-token

Request Body:

{
  "clientId" : string,
  "clientSecret": string
}

Response:

{
   "accessToken": string,
   "tokenType": string,
   "expiry": 86400,  // in seconds
}

Sample Curl:

curl --location '<host>/es/v2/oauth/client-token' \
--header 'Content-Type: application/json' \
--data '{
  "clientId" : "sv1bF0b1dJ1e4chd",
  "clientSecret": "B3dbXd61f122Of3db9dP0Hd6d547da02"
}'

Authentication Headers

The access token should be passed in Authorization header as bearer token in each request to the MadConnect Embedded API.

Authorization: Bearer YOUR_ACCESS_TOKEN

Last updated