Exchange OAuth token
Exchange a PKCE authorization code or rotate a refresh token.
API 2.7.0 · Published service contract ↗
Request
Base URL: https://app.sym.so/v1/workspaces/{workspace_id}
Authentication: public_oauth_exchange. Required scope: Public OAuth exchange.
POST /oauth/token
Exchange a PKCE authorization code or rotate a refresh token.
curl --fail-with-body -X POST "https://app.sym.so/v1/workspaces/$WORKSPACE_ID/oauth/token" \
-H "Content-Type: application/json" \
--data "{\"grant_type\":\"authorization_code\",\"client_id\":\"oauth_client_01J8\",\"code\":\"one_time_authorization_code\",\"code_verifier\":\"pkce_verifier\",\"redirect_uri\":\"https://example.com/callback\"}"{
"token_type": "Bearer",
"access_token": "sym_oa_…",
"expires_in": 3600,
"refresh_token": "sym_or_…",
"scope": "workspace:read"
}Authorization
{
"type": "public_oauth_exchange",
"scope": "Public OAuth exchange",
"transport": "OAuth request body."
}Errors
| Status | Description |
|---|---|
| 400 | The grant type or required request fields are invalid. |
| 401 | The authorization code, PKCE verifier, or refresh token is invalid, expired, or revoked. |