1. Token API

Create

The Create endpoint generates an API key.

Relative Route

/

HTTP Verb

POST

Request body

The structure of DeliveryApiKeyInfo is as follows:

{
 "CreatedBy": "ADN",
 "Label": "Example key",
 "Scopes": ["scope1", "scope2"]
}

For additional information on scopes, see Scopes.

Response body

The response is the token:

MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3

Example

The following example requests the scopes of audience-preview and audience-delivery. This means that the returned X-GQL-Token is valid for both the Preview API and the Delivery API:

  {
    "createdBy": "somebody",
    "label": "Testing Access",
    "scopes": [
      "content-#everything#",
      "audience-preview",
      "audience-delivery"
    ]
  }
If you have suggestions for improving this article, let us know!