Generating API Tokens
Tokens are required for all DX Graph API calls. They include the permissions of the user that generated them.
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://io.conscia.ai/graphql
Content-Type: application/json
x-request-type: GraphQL
query ($input: GenerateOfflineAPIKeyFromCredentialsInput) {
generateOfflineAPIKeyFromCredentials(input: $input)
}
{
"input": {
"username": "ayana@acme.com",
"password": "somePassword!"
}
}
Generating a temporary Token
Temporary tokens are useful for testing and debugging. They are valid for 1 hour.
POST https://io.conscia.ai/graphql
Content-Type: application/json
query ($input: GenerateAPIKeyFromCredentialsInput) {
generateAPIKeyFromCredentials(input: $input)
}
{
"input": {
"username": "ayana@acme.com",
"password": "somePassword!"
}
}