Skip to Content
GraphQLAuthentication

Authentication

Access to the API utilizes OAuth2 .

Client Credentials (ID and secret) are provided for each user of the API, allowing for retrieval of bearer access token with preset expiry (default 3600 seconds).

We must encode the combination of Client ID and Client Secret Key separated by ”:” in Base 64 format like this:

Base64Encode(5pq9999coididi613e222o1nnpp: fhkoq33a69d8191j1tercv35037clb9e5a7d215e64e4e) = 85e1b0e7539a4a96b00ee02b335aa6418c580917a6b4667f6f7a6fe2149536041569924dfbe4a7df33f==

Can use online service Base64Encode  for the encoding.

The end point for the token must include two parameters with optional scope parameter:

  1. “grant_type” = “client_credentials”
  2. “client_id” = “5pq9999coididi613e222o1nnpp”
  3. To authenticate successfully, if providing scope parameter, ensure the scope is set to either:
    “scope” = "" (empty string) or “scope” = “https://api.constellation1apis.com/Api.Read ” depending on your integration requirements.

Example request to retrieve access token:

curl -X POST -H "Content-Type: application/x-www-form-urlencoded" \ -H "Authorization: Basic 85e1b0e7539a4a96b00ee02b335aa6418c580917a6b4667f6f7a6fe2149536041569924dfbe4a7df33f==" \ -H "Host: authenticate.constellation1apis.com" \ "https://authenticate.constellation1apis.com/oauth2/token?grant_type=client_credentials&client_id=5pq9999coididi613e222o1nnpp"

Authentication response:

{ "access_token": "**********************************", "expires_in": 3600, "token_type": "Bearer" }