Tools API
OAuth Token Exchange
Exchange an authorization code for an OAuth access token
POST
Exchanges an OAuth authorization code for an access token. This endpoint does not require JWT authentication since it is used during the OAuth callback flow.
Supported Providers
| Provider | Description | Environment Variables |
|---|---|---|
github | GitHub OAuth | GITHUB_CLIENT_ID / GITHUB_CLIENT_SECRET |
google_drive | Google Drive | GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET |
gmail | Gmail | GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET |
slack | Slack | SLACK_CLIENT_ID / SLACK_CLIENT_SECRET |
notion | Notion | NOTION_CLIENT_ID / NOTION_CLIENT_SECRET |
OAuth provider:
github | google_drive | gmail | slack | notionOAuth authorization code
OAuth callback URL (must match the one used in the authorization request)
Access token
Refresh token (provided by some providers)
Expiration timestamp (Unix timestamp, provided by some providers)
Token type, typically
Bearer