Skip to main content
Twenty implements OAuth 2.0 with authorization code + PKCE for user-facing apps and client credentials for server-to-server access. Clients are registered dynamically via RFC 7591 — no manual setup in a dashboard.

When to Use OAuth

Register a Client

Twenty supports dynamic client registration per RFC 7591. No manual setup needed — register programmatically:
Response:
Store the client_secret securely — it cannot be retrieved later.

Scopes

Request scopes as a space-separated string: scope=api profile

Authorization Code Flow

Use this flow when your app acts on behalf of a Twenty user.

1. Redirect the user to authorize

The user sees a consent screen and approves or denies access.

2. Handle the callback

After authorization, Twenty redirects back to your redirect_uri:
Verify that state matches what you sent.

3. Exchange the code for tokens

Response:

4. Use the access token

5. Refresh when expired

Client Credentials Flow

For server-to-server integrations with no user interaction:
The returned token has workspace-level access, not tied to any specific user.

Server Discovery

Twenty publishes its OAuth configuration at a standard discovery endpoint:
This returns all endpoints, supported grant types, scopes, and capabilities — useful for building generic OAuth clients.

API Endpoints Summary

OAuth vs API Keys