feat: add Google Ads as an auth service#264
Open
ufkhan97 wants to merge 1 commit intosteipete:mainfrom
Open
Conversation
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.
Owner
|
What is the point of this? Not quite sure I get it? |
Author
|
Giving the claw access to manage my google ads accounts has been super
helpful for a business I run. others will find it useful too if it is one
of the default options when connecting with gogcli
…On Sun, Mar 8, 2026 at 5:15 PM Peter Steinberger ***@***.***> wrote:
*steipete* left a comment (steipete/gogcli#264)
<#264 (comment)>
What is the point of this? Not quite sure I get it?
—
Reply to this email directly, view it on GitHub
<#264 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKO2NISKTW2FOJLGHIHBQD34PXPIDAVCNFSM6AAAAACVE6RW46VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DAMRQGAZDMNRWGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
adsas a new service forgog auth add, enabling OAuth tokens with thehttps://www.googleapis.com/auth/adwordsscope.What
ServiceAdsin the services listgog auth add user@example.com --services adsobtains a token with the Google Ads API scopeWhy
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: AddServiceAdsconstant, scope mapping, and switch caseinternal/googleauth/service_test.go: Update test expectations14 lines added, 4 changed. Tests pass.