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 that we want to get access information about
["aproject:development.randomstring","[]:production.randomstring"]
Responses
- 200
- 400
- 413
- 415
validatedEdgeTokensSchema
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
tokens
object[]
required
The list of Unleash token objects. Each object contains the token itself and some additional metadata.
The 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 [*
]
["developerexperience","enterprisegrowth"]
The actual token value. Unleash API tokens are comprised of three parts. <project(s)>:
*:development.5c806b5320c88cf27e81f3e9b97dab298a77d5879316e3c2d806206b
{
"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
The ID of the error instance
9c40958a-daac-400e-98fb-3bb438567008
The name of the error kind
ValidationError
A description of what went wrong.
The request payload you provided doesn't conform to the schema. The .parameters property should be object. You sent [].
{
"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
The ID of the error instance
9c40958a-daac-400e-98fb-3bb438567008
The name of the error kind
ContentTooLarge
A description of what went wrong.
You provided more data than we can handle. Unleash accepts at most X MB.
{
"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
The ID of the error instance
9c40958a-daac-400e-98fb-3bb438567008
The name of the error kind
ContentTypeerror
A description of what went wrong.
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.
{
"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."
}