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"
}
Tools API
OAuth Token Exchange
Exchange an authorization code for an OAuth access token
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
| 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 |
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"
}