Skip to main content

Get API tokens

GET 

<your-unleash-url>/api/admin/api-tokens

Retrieves all API tokens that exist in the Unleash instance.

Responses

apiTokensSchema

Schema
    tokens object[]required

    A list of Unleash API tokens.

  • Array [
  • secretstringrequired

    The token used for authentication.

    Example: project:environment.xyzrandomstring
    usernamestringdeprecated

    This property was deprecated in Unleash v5. Prefer the tokenName property instead.

    Example: a-name
    tokenNamestringrequired

    A unique name for this particular token

    Example: some-user
    typestringrequired

    The type of API token

    Possible values: [client, admin, frontend]

    Example: client
    environmentstring

    The environment the token has access to. * if it has access to all environments.

    Example: development
    projectstringrequired

    The project this token belongs to.

    Example: developerexperience
    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"]
    expiresAtdate-timenullable

    The token's expiration date. NULL if the token doesn't have an expiration set.

    Example: 2023-04-19T08:15:14.000Z
    createdAtdate-timerequired

    When the token was created.

    Example: 2023-04-19T08:15:14.000Z
    seenAtdate-timenullable

    When the token was last seen/used to authenticate with. NULL if the token has not yet been used for authentication.

    Example: 2023-04-19T08:15:14.000Z
    aliasstringnullable

    Alias is no longer in active use and will often be NULL. It's kept around as a way of allowing old proxy tokens created with the old metadata format to keep working.

    Example: randomid-or-some-alias
  • ]

Authorization: Authorization

name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API
curl -L '<your-unleash-url>/api/admin/api-tokens' \
-H 'Accept: application/json' \
-H 'Authorization: <Authorization>'
Request Collapse all
Base URL
<your-unleash-url>
Auth
ResponseClear

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