Skip to content

feat: add Google Ads as an auth service#264

Open
ufkhan97 wants to merge 1 commit intosteipete:mainfrom
ufkhan97:feat/add-google-ads-service
Open

feat: add Google Ads as an auth service#264
ufkhan97 wants to merge 1 commit intosteipete:mainfrom
ufkhan97:feat/add-google-ads-service

Conversation

@ufkhan97
Copy link

Adds ads as a new service for gog auth add, enabling OAuth tokens with the https://www.googleapis.com/auth/adwords scope.

What

  • New ServiceAds in the services list
  • gog auth add user@example.com --services ads obtains a token with the Google Ads API scope
  • Auth-only for now — no CLI commands, but the refresh token works with any Google Ads API client

Why

Google Ads API requires OAuth with the adwords scope. Currently there's no way to get this through gog, so users managing Google Workspace + Ads for the same account need a separate auth flow. This lets them use gog's existing auth infrastructure.

Changes

  • internal/googleauth/service.go: Add ServiceAds constant, scope mapping, and switch case
  • internal/googleauth/service_test.go: Update test expectations

14 lines added, 4 changed. Tests pass.

Add 'ads' as a new service for gog auth, enabling OAuth tokens with
the https://www.googleapis.com/auth/adwords scope. This allows users
to obtain and refresh tokens for the Google Ads API through gog's
existing auth flow.

Auth-only for now — no CLI commands for the Ads API, but the token
can be used with Google Ads API clients directly.
@steipete
Copy link
Owner

steipete commented Mar 8, 2026

What is the point of this? Not quite sure I get it?

@ufkhan97
Copy link
Author

ufkhan97 commented Mar 8, 2026 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants