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
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
{
"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."
}
Request
Request
curl -L -X POST '<your-unleash-url>/edge/validate' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"tokens": [
"aproject:development.randomstring",
"[]:production.randomstring"
]
}'
curl -L -X POST '<your-unleash-url>/edge/validate' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"tokens": [
"aproject:development.randomstring",
"[]:production.randomstring"
]
}'
curl -L -X POST '<your-unleash-url>/edge/validate' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"tokens": [
"aproject:development.randomstring",
"[]:production.randomstring"
]
}'
curl -L -X POST '<your-unleash-url>/edge/validate' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"tokens": [
"aproject:development.randomstring",
"[]:production.randomstring"
]
}'
curl -L -X POST '<your-unleash-url>/edge/validate' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"tokens": [
"aproject:development.randomstring",
"[]:production.randomstring"
]
}'
curl -L -X POST '<your-unleash-url>/edge/validate' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"tokens": [
"aproject:development.randomstring",
"[]:production.randomstring"
]
}'
curl -L -X POST '<your-unleash-url>/edge/validate' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"tokens": [
"aproject:development.randomstring",
"[]:production.randomstring"
]
}'
curl -L -X POST '<your-unleash-url>/edge/validate' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"tokens": [
"aproject:development.randomstring",
"[]:production.randomstring"
]
}'
curl -L -X POST '<your-unleash-url>/edge/validate' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"tokens": [
"aproject:development.randomstring",
"[]:production.randomstring"
]
}'