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 | notion
OAuth callback URL (must match the one used in the authorization request)
Refresh token (provided by some providers)
Expiration timestamp (Unix timestamp, provided by some providers)
Token type, typically Bearer
curl --request POST \
--url https://zeus-api.agentspro.cn/api/tools/oauth/exchange \
--header 'Content-Type: application/json' \
--data '{
"provider": "github",
"code": "abc123def456",
"redirect_uri": "https://zeus.agentspro.cn/oauth/callback"
}'
{
"access_token": "gho_xxxxxxxxxxxx",
"refresh_token": null,
"expires_at": null,
"token_type": "Bearer"
}