Exchange Google OAuth Code
google_ads_exchange_codeExchange a Google OAuth authorization code for local API tokens, securely storing them with restricted file permissions.
Instructions
Exchange a Google OAuth authorization code for local tokens. Tokens stored at ~/.google-ads-mcp/tokens.json with 0600 perms; never returned in the response.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | OAuth authorization code, or a full redirect URL containing ?code=... | |
| response_format | No | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| note | Yes | ||
| scope | No | ||
| expires_at | No | ||
| token_path | Yes | ||
| has_refresh_token | Yes |