Overview
The Chatwoot API uses access tokens for authentication. All API requests must include a valid access token to authenticate the request.Authentication Methods
User Access Token
User access tokens are tied to a specific user account and inherit the permissions of that user.Generating a User Access Token
- Log in to your Chatwoot account
- Navigate to Profile Settings
- Go to the Access Token section
- Click Generate new token or copy existing token
- Store the token securely
Platform API Token
Platform API tokens are used for server-to-server authentication and allow managing multiple accounts.Platform API tokens are only available in self-hosted installations with platform mode enabled.
Making Authenticated Requests
Using Header Authentication (Recommended)
Include the access token in the request header:Authentication Header Format
Your API access token
Request content type
Token Management
Resetting Your Access Token
You can reset your access token from your profile settings:Authentication for Different APIs
Application API (User API)
Used for managing resources within an account. Base URL:/api/v1/accounts/{account_id}/*
Authentication: User Access Token
Platform API
Used for managing users and accounts (self-hosted only). Base URL:/platform/api/v1/*
Authentication: Platform API Token
Public API
Used by contacts to interact with conversations (no authentication required for public endpoints). Base URL:/public/api/v1/*
Authentication: Contact token or identifier
Agent Bot Authentication
Agent bots use a special access token for authentication:OAuth Authentication
Chatwoot uses OAuth for third-party integrations:Supported OAuth Providers
- Twitter (X)
- Microsoft
- TikTok
- Notion
OAuth Flow
- Redirect user to authorization endpoint
- User grants permissions
- Receive authorization code
- Exchange code for access token
SAML Authentication
Enterprise accounts can use SAML single sign-on:User email address
Security Best Practices
Store Tokens Securely
- Use environment variables for tokens
- Never commit tokens to version control
- Use secret management tools (HashiCorp Vault, AWS Secrets Manager)
Rotate Tokens Regularly
- Reset access tokens periodically
- Rotate tokens when team members leave
- Monitor token usage for suspicious activity
Use HTTPS Only
- Always use HTTPS for API requests
- Never send tokens over unencrypted connections
Limit Token Scope
- Use role-based access control
- Create separate tokens for different integrations
- Use agent bots for automated tasks

