Skip to main content
POST
/
api
/
tools
/
oauth
/
exchange
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"
}
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

ProviderDescriptionEnvironment Variables
githubGitHub OAuthGITHUB_CLIENT_ID / GITHUB_CLIENT_SECRET
google_driveGoogle DriveGOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET
gmailGmailGOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET
slackSlackSLACK_CLIENT_ID / SLACK_CLIENT_SECRET
notionNotionNOTION_CLIENT_ID / NOTION_CLIENT_SECRET
provider
string
required
OAuth provider: github | google_drive | gmail | slack | notion
code
string
required
OAuth authorization code
redirect_uri
string
required
OAuth callback URL (must match the one used in the authorization request)
access_token
string
Access token
refresh_token
string
Refresh token (provided by some providers)
expires_at
number
Expiration timestamp (Unix timestamp, provided by some providers)
token_type
string
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"
}