Client authentication

The client is required to be correctly authenticated in order to be able to perform requests to the GraphQL API.

To achieve this perform an HTTP POST request to <BASE_URL>/graphql with the following JSON body:

{
  "query": "<ESCAPED_QUERY>",
  "variables": {
    "clientId": "<CLIENT_ID>"
  }
}

Notes:

  • The <BASE_URL> value will depend of which environment the client is performing requests to. Please refer to the environments section for more information.

  • The <CLIENT_ID> value will be shared ahead of time

  • The <ESCAPED_QUERY> must contain the following GraphQL query:

mutation($clientId: String!) {
  authenticateClient(clientId: $clientId) {
    accessToken {
      value
    }
  }
}

The accessToken value is valid for an hour and therefore can be re-used to perform requests to the API.

The authentication request can be performed at any point in time to retrieve a fresh accessToken value.

Last updated

Was this helpful?