Skip to content

Authentication

The API supports API access keys and user tokens. Use the credentials issued for the target environment.

Token Authentication#

Request tokens using a user account.

HTTPPOST
POST https://api.{ENV}.dais.com/ioi/v3/token
cURL
curl --location --request POST 'https://api.{ENV}.dais.com/ioi/v3/token' \
--header 'Content-Type: application/json' \
--data-raw '{
  "userId": "<Username>",
  "password": "<Password>",
  "grantType": "PASSWORD"
}'

The request requires userId, password, and grantType. Use the returned accessToken and idToken in subsequent requests:

JSON
{
  "Authorization": "Bearer <Access token>",
  "x-jwt-assertion": "<ID token>"
}

API Key Authentication#

API access keys use an API key and secret, managed under Dev Tools > API Access Keys.

Keep the secret on your backend. Load it from an environment variable or key management service rather than exposing it in browser or mobile code.

Send the base64 encoding of Api Key:Secret in the Authorization header:

Text
Authorization: Basic <Base64-encoded API key and secret>

Verify Authentication#

HTTPGET
GET https://api.{ENV}.dais.com/ioi/v3/hello

With an API access key:

cURL
curl --location --request GET 'https://api.{ENV}.dais.com/ioi/v3/hello' \
--header 'Authorization: Basic <Base64-encoded API key and secret>'

With user tokens:

cURL
curl --location --request GET 'https://api.{ENV}.dais.com/ioi/v3/hello' \
--header 'Authorization: Bearer <Access token>' \
--header 'x-jwt-assertion: <ID token>'

A successful request returns the text hello.