Authentication.
Secure your API requests.
The Clear Tangle API supports two authentication methods: API keys for server-to-server communication and OAuth 2.0 for user-authorized applications. Choose the method that best fits your use case.
Authentication methods
API keys
API keys provide a straightforward way to authenticate requests with per-key rate limits and usage tracking. Generate keys from Settings → API Keys.
Key format
All API keys use the ctak_ prefix. Each key can have custom rate limits and shows detailed usage analytics.
Usage
Include your API key in the X-API-Key header:
OAuth 2.0
OAuth 2.0 allows your application to access Clear Tangle on behalf of users. Implement the Authorization Code flow for web applications.
Available scopes
readRead access to captures, tasks, and pageswriteCreate and update captures, tasks, and pagesdeleteDelete captures, tasks, and pageschatAccess AI chat functionalityoffline_accessRequest refresh tokensAuthorization flow
Refresh tokens
Access tokens expire after 1 hour. Use refresh tokens to obtain new access tokens without requiring user interaction:
Security best practices
Common errors
401 UnauthorizedInvalid API key or expired tokenSolution: Verify your API key is correct and hasn’t been revoked. For OAuth, refresh the access token.403 ForbiddenInsufficient scopeSolution: Request additional scopes during OAuth authorization.401 Token ExpiredAccess token has expiredSolution: Use the refresh token to obtain a new access token.