Skip to main content

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

Bodyrequired

tokenStringListSchema

    tokensstring[]required

    Tokens that we want to get access information about

    Example: ["aproject:development.randomstring","[]:production.randomstring"]

Responses

validatedEdgeTokensSchema

Schema
    tokens object[]required

    The list of Unleash token objects. Each object contains the token itself and some additional metadata.

  • Array [
  • projectsstring[]required

    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 [*]

    Example: ["developerexperience","enterprisegrowth"]
    typestringrequired

    The API token's type. Unleash supports three different types of API tokens (ADMIN, CLIENT, FRONTEND). They all have varying access, so when validating a token it's important to know what kind you're dealing with

    Possible values: [client, admin, frontend]

    Example: client
    tokenstringrequired

    The actual token value. Unleash API tokens are comprised of three parts. <project(s)>:.randomcharacters

    Example: *:development.5c806b5320c88cf27e81f3e9b97dab298a77d5879316e3c2d806206b
  • ]
curl -L '<your-unleash-url>/edge/validate' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"tokens": [
"aproject:development.randomstring",
"[]:production.randomstring"
]
}'
Request Collapse all
Base URL
<your-unleash-url>
Body required
{
  "tokens": [
    "aproject:development.randomstring",
    "[]:production.randomstring"
  ]
}
ResponseClear

Click the Send API Request button above and see the response here!