Check which tokens are valid
POST<your-unleash-url>/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
Bodyrequired
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 (auto)
Schema
tokens object[]required
{
"tokens": [
{
"projects": [
"developerexperience",
"enterprisegrowth"
],
"type": "client",
"token": "*:development.5c806b5320c88cf27e81f3e9b97dab298a77d5879316e3c2d806206b"
}
]
}
The request data does not match what we expect.
- application/json
- Schema
- Example (auto)
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 (auto)
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 (auto)
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."
}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L '<your-unleash-url>/edge/validate' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"tokens": [
"aproject:development.randomstring",
"[]:production.randomstring"
]
}'