Skip to main content

Generating API Tokens

Tokens are required for all DX Graph API calls. They include the permissions of the user that generated them.

Determine a DX Graph API endpoint and generate an API Token for that endpoint. Available API endpoint options for DX Graph: https://docs.conscia.ai/api/dx-graph#servers

Generating an Offline Token

Offline tokens have no expiration date and can be used to authenticate to the DX Graph API. They are useful for automating processes that need to access the DX Graph API.

POST https://{host}/graphql
Content-Type: application/json
X-Request-Type: GraphQL
X-Customer-Code: {customer-code}

query ($input: GenerateOfflineAPIKeyFromCredentialsInput) {
generateOfflineAPIKeyFromCredentials(input: $input)
}

{
"input": {
"username": "ayana@acme.com",
"password": "somePassword!"
}
}

Using Postman:

Using Postman to Generate a DX Graph API Token

Generating a Temporary Token

Temporary tokens are useful for testing and debugging. They are valid for 1 hour.

POST https://{host}/graphql
Content-Type: application/json
X-Request-Type: GraphQL
X-Customer-Code: {customer-code}

query ($input: GenerateAPIKeyFromCredentialsInput) {
generateAPIKeyFromCredentials(input: $input)
}

{
"input": {
"username": "ayana@acme.com",
"password": "somePassword!"
}
}