Authentication
The public bot API is available under /api/v1/bots. Send your credential in the Authorization header over HTTPS.
The bot middleware also accepts the Bot authorization scheme. Use Bearer in new clients.
Credential types
A token prefix helps identify its type. Authentication also checks the stored credential, revocation, expiry, and installation state. Treat the full value as a secret and keep it in your server's secret store. Avoid including tokens in source control, browser bundles, logs, or URLs.
An installation token's effective scopes are restricted by both the token and the installation's grants. The installation must be active and have a bot account. Bot and installation credentials are tied to their workspace.
Scopes for public endpoints
These paths are relative to /api/v1. Scopes authorize an operation. Workspace access, channel membership, ownership, encryption mode, and message age can still prevent it.
Personal access tokens
Personal access tokens have the user:full scope and act as their owner only on explicitly allowed routes and HTTP methods. These include profile operations, workspace and organization reads, channels, messages, threads, files, search, drafts, and canvas documents, subject to the user's normal permissions.
Token creation depends on organization policy. A signed-in user manages personal tokens under /api/v1/me/personal-access-tokens. Organization settings and expiry policy can restrict creation and use.
Bot credential, webhook, app installation, connector, security, and administration management routes require a user session. A personal token on a session-only route receives 403 with error_code set to personal_access_token_not_allowed. Public /bots routes accept bot or installation tokens.
Management authentication
Creating, rotating, and revoking bot tokens uses the workspace user API under /api/v1/workspaces/{workspace_id}/integrations/bots/tokens. These routes use the signed-in user's session and check integration management permission. Browser session requests are also subject to origin protection.
Use the product's integration settings for the first credential. See bots for the management contract and apps for installation tokens.
Authentication errors
Missing, malformed, unknown, revoked, or expired credentials return 401. A valid credential missing an endpoint's required scope returns 403.
Error messages are diagnostic text. Branch on HTTP status in your client. See requests and errors.