nexus_oauth_exchange
Complete the OAuth2 flow by exchanging the authorization code for tokens via PKCE, saving them for automatic refresh and validating your identity.
Instructions
Complete the OAuth2 flow: exchange the authorization code for tokens.
Exchanges via PKCE code_verifier (+ client_secret when configured), saves tokens to the token file, and validates the identity with the resulting Bearer token. Tokens auto-refresh; any 4xx refresh response is treated as revocation per the official guide.
Returns: JSON account summary from nexus_validate_key, or an error string.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The 'code' query parameter from the OAuth redirect after nexus_oauth_login. | |
| state | No | Optional 'state' value from the redirect URL; verified against the pending login when provided. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |