---
title: "Get or create valid tokens for the requested environment"
method: POST
path: "/edge/issue-token"
tags: ["Unleash Edge"]
---

# Get or create valid tokens for the requested environment

`POST /edge/issue-token`

This operation accepts a list of environments/project pairs to return tokens for. If they do not exist, Unleash will generate them

## Request body

- EdgeEnvironmentProjectsListSchema — Schema to request api tokens for a list of environment -> projects tuples
  - `tokens` object[], required — A list of requested api tokens.
    - `environment` string, required — The name of an existing environment
    - `projects` string[], required — The list of projects Edge wants access to, or '*' for a wildcard token

## Response `200`

validatedEdgeTokensSchema

- ValidatedEdgeTokensSchema — A object containing a list of valid Unleash tokens.
  - `tokens` EdgeTokenSchema[], required — The list of Unleash token objects. Each object contains the token itself and some additional metadata.
    - `projects` string[], 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 [`*`]
    - `environment` string, required — The environment this token as access to
    - `type` 'client' | 'admin' | 'frontend' | 'backend', required — The [API token](https://docs.getunleash.io/concepts/api-tokens-and-client-keys)'s **type**. Unleash supports three different types of API tokens ([ADMIN](https://docs.getunleash.io/concepts/api-tokens-and-client-keys#admin-tokens), [CLIENT](https://docs.getunleash.io/concepts/api-tokens-and-client-keys#backend-tokens), [FRONTEND](https://docs.getunleash.io/concepts/api-tokens-and-client-keys#frontend-tokens)). They all have varying access, so when validating a token it's important to know what kind you're dealing with
    - `token` string, required — The actual token value. [Unleash API tokens](https://docs.getunleash.io/concepts/api-tokens-and-client-keys) are comprised of three parts. <project(s)>:<environment>.randomcharacters

## Other responses

- `400` — The request data does not match what we expect.
- `403` — The provided user credentials are valid, but the user does not have the necessary permissions to perform this operation
- `413` — The request body is larger than what we accept. By default we only accept bodies of 100kB or less
- `415` — 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.

---

[API](https://skmtc.net/unleash/apis/unleash-api-3.md) · [All operations](https://skmtc.net/unleash/apis/unleash-api-3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/unleash/unleash-api-3/revisions/b2c3116e633e/schema)
