Skip to main content

Version: latest

Obtain a Token from the Dashboard

API7 Enterprise uses Dashboard-created tokens for authenticated access. Across the docs, the same token can be used as the X-API-KEY value in API7 Enterprise Admin API requests or as ADC_TOKEN when using ADC.

For routine API access, sign in with a non-root user and create a token for that user instead of using the initial Super Admin account.

Before You Begin

  • A running API7 Gateway instance with Dashboard access.
  • A non-root user account with the permissions required for the resources you want to manage.

If you only have the initial administrator account, sign in as Super Admin, create or invite a user, assign the required role, and then sign in with that user before creating a token. For details, see User Management and Role-Based Access Control.

Create a Token in the Dashboard

  1. Sign in to the Dashboard with your non-root user account.
  2. In the sidebar, navigate to Organization -> Tokens.
  3. Click Create Token.
  4. Enter a name and any other required settings.
  5. Copy the generated token and store it securely.

Use the Token

Set the token as an environment variable for Admin API examples:

export API_KEY="a7ee-xxxxxxxxxxxxx"

Use it in API7 Enterprise Admin API requests:

If you are not running locally, replace localhost with your Dashboard or Admin API host.

curl -k "https://localhost:7443/api/users" -X GET \
-H "X-API-KEY: ${API_KEY}"

You can use the same token for:

  • API7 Enterprise Admin API requests under /api/* and /apisix/admin/*
  • ADC authentication as ADC_TOKEN

Security Notes

  • Treat the token like a password and do not commit it to source control.
  • Create separate tokens for different users or automation workflows when possible.
  • Revoke tokens you no longer need.
API7.ai Logo

The digital world is connected by APIs,
API7.ai exists to make APIs more efficient, reliable, and secure.

Sign up for API7 newsletter

Product

API7 Gateway

SOC2 Type IIISO 27001HIPAAGDPRRed Herring

Copyright © APISEVEN PTE. LTD 2019 – 2026. Apache, Apache APISIX, APISIX, and associated open source project names are trademarks of the Apache Software Foundation