loading

Create Token

Create an API Token from a valid Yext API Key and provided parameters.

Request Body schema: application/json
api_key
required
string

A valid Yext API key for an app with the Secure Token Live Api permission enabled.

expires_in
required
integer

The number of minutes the Api Token will be valid for. Per Yext requirements, an Api Token must be valid for at least an hour but for no longer than a day. As such, expires_in can take values within the range of [60, 1440].

auth_identifier
required
string

A freeform string identifying the user for whom the token is being created.

fixed_query_params
required
object

Optional JSON object specifying a set of query parameters and subsequent values that should be applied to the URL of any request that uses the token as an Api Key. If these parameters are present in the original request, they will be replaced with the values contained in this field.

signing_algorithm
required
string

The encryption algorithm used to sign the token. Options include:

  • RS256
  • HS256
  • ES256

Responses

Request samples

Content type
application/json
{
  • "api_key": "oin3rqnka321ojas",
  • "expires_in": 60,
  • "auth_identifier": "John Doe",
  • "fixed_query_params": { },
  • "signing_algorithm": "HS256"
}

Response samples

Content type
application/json
{
  • "body": {
    },
  • "statusCode": 201
}