API Tokens
API tokens authorize programmatic access to Glean's REST APIs:
- Indexing API: For pushing content into Glean
- Client API: For search, chat, agents, and other user-facing functionality
Admins create and manage these tokens in the Admin Console under Platform → API tokens. This page covers managing tokens in the Admin Console. For how to authenticate and call the APIs, see the Glean developer documentation.
Add an API token
To get started with a token, click Add token in the top right corner of the page. Name the token, specify whether it has global permissions or scoped permissions to specific apps, and set an expiration date. Tokens can be revoked from the dashboard as well.
Indexing API tokens require an expiration date.
For the full token creation reference — including IP restrictions, token rotation, and the roles required to create each token type — see Indexing API authentication and Client API authentication in the developer documentation.
Client API tokens for specific agents
When you create a Client API token, you can restrict its access to one or more specific agents instead of granting access to all agents available to your account.
Creation methods
You can generate scoped tokens from two locations in the platform:
- Admin console: Go to the API tokens page to scope a token to one or more selected agents.
- Agent share panel: Open a specific agent, click Share → API, and generate a token dedicated exclusively to that agent.
Key considerations and limitations
- Security requirement: The token secret is displayed only once during creation. Copy and store it securely in a password manager or vault before closing the window; it cannot be recovered.
- Scope restriction: A scoped token only authorizes requests for its explicitly assigned agents.
- Expiration: Scoped agent tokens automatically expire one year after their creation date.
- Uniqueness constraint: Only one token can exist per user and agent combination.
- Token rotation: The system does not support automated rotation or multiple concurrent tokens for the same agent. To rotate a token, you must delete the existing token and create a new one.
See also
Authentication overview
Server URLs, OAuth, and Glean-issued tokens for the Client and Indexing APIs.
Developer guides
Step-by-step guides for building agents and tools, and for the search, chat, and MCP APIs.
Web SDK
Embed Glean search, chat, and recommendations directly into your web applications.
All developer docs
Browse the full developer documentation, including the complete API reference and changelog.