Check which tokens are valid
POST /edge/validate
This operation accepts a list of tokens to validate. Unleash will validate each token you provide. For each valid token you provide, Unleash will return the token along with its type and which projects it has access to.
Request
- application/json
Body
required
tokenStringListSchema
- tokens string[] required
Tokens that we want to get access information about
- 200
- 400
- 413
- 415
validatedEdgeTokensSchema
- application/json
- Schema
- Example (from schema)
Schema
tokens object[]required
The list of Unleash token objects. Each object contains the token itself and some additional metadata.
Array [projects string[] requiredThe list of projects this token has access to. If the token has access to specific projects they will be listed here. If the token has access to all projects it will be represented as [
*
]token string requiredThe actual token value. Unleash API tokens are comprised of three parts. <project(s)>:
.randomcharacters ]
{
"tokens": [
{
"projects": [
"developerexperience",
"enterprisegrowth"
],
"type": "client",
"token": "*:development.5c806b5320c88cf27e81f3e9b97dab298a77d5879316e3c2d806206b"
}
]
}
The request data does not match what we expect.
- application/json
- Schema
- Example (from schema)
Schema
- id string
The ID of the error instance
- name string
The name of the error kind
- message string
A description of what went wrong.
{
"id": "9c40958a-daac-400e-98fb-3bb438567008",
"name": "ValidationError",
"message": "The request payload you provided doesn't conform to the schema. The .parameters property should be object. You sent []."
}
The request body is larger than what we accept. By default we only accept bodies of 100kB or less
- application/json
- Schema
- Example (from schema)
Schema
- id string
The ID of the error instance
- name string
The name of the error kind
- message string
A description of what went wrong.
{
"id": "9c40958a-daac-400e-98fb-3bb438567008",
"name": "ContentTooLarge",
"message": "You provided more data than we can handle. Unleash accepts at most X MB."
}
The operation does not support request payloads of the provided type. Please ensure that you're using one of the listed payload types and that you have specified the right content type in the "content-type" header.
- application/json
- Schema
- Example (from schema)
Schema
- id string
The ID of the error instance
- name string
The name of the error kind
- message string
A description of what went wrong.
{
"id": "9c40958a-daac-400e-98fb-3bb438567008",
"name": "ContentTypeerror",
"message": "We do not accept the content-type you provided (application/xml). Try using one of the content-types we do accept instead (application/json) and make sure the body is in the corresponding format."
}