Code Monkey home page Code Monkey logo

Comments (11)

alessandro-aglietti avatar alessandro-aglietti commented on July 30, 2024 3

@avermeil hi!
Thanks for creating this library, we found it very useful.
As @npearce and @mateioprea also asked it is very useful to be able to authenticate with a service account.
In an internal corporate software development context, like us at brumbrum.it, it is useful to associate the credentials with a service account rather than with a real user account.

We're starting to work on this pr, we think to propose somenthing functional in the next days.

Our implementation idea start from adding a ServiceAccount type for the ClientOptions and drill down those data till GrpcClient.
Doing that we will able to extend the accessTokenGetter and manage a new getAccessTokenForServiceAccount in token.ts when ServiceAccount data is set.

Make sense for you?

Regards,

from google-ads-api.

avermeil avatar avermeil commented on July 30, 2024 1

Hi @alessandro-aglietti ,

Thanks for taking the time to work on this! Yes, the solution you propose sounds good :)

from google-ads-api.

htdangkhoa avatar htdangkhoa commented on July 30, 2024 1

Hi @wcoots, I have created a library about Google Ads for NodeJS and support Service Account, you can refer to it: https://github.com/htdangkhoa/google-ads
https://github.com/htdangkhoa/google-ads/blob/main/src/lib/utils.ts#L5

Thanks

from google-ads-api.

avermeil avatar avermeil commented on July 30, 2024

Hi @mateioprea !

At the moment, we don't support Service Accounts. We've actually never used them, so we're not totally sure how they should work. PRs welcome ;)

That said, is there any reason why you wouldn't want to use a standard OAuth flow (just do it once, manually) to get yourself a permanent refresh token? We've set up a helper to do this: https://refresh-token-helper.opteo.com/

from google-ads-api.

mateioprea avatar mateioprea commented on July 30, 2024

Hi @avermeil!

So it works for generating a permanent refresh token?

from google-ads-api.

npearce avatar npearce commented on July 30, 2024

I am also looking at the service account option as, from what I can tell (their docs aren't great) Google insists on having a G-Suite domain to create an 'Internal' OAuth consent.

from google-ads-api.

mateioprea avatar mateioprea commented on July 30, 2024

Hi @alessandro-aglietti,

Quick heads up about the new google ads api: it's so slow that the client that I'm working with decided to switch to adwords api.

Just a quick comparison: for pulling 10k keywords from the AdGroups takes about 30s - 1 minute while with the adwords api, it takes 4-5 seconds. :)

from google-ads-api.

alessandro-aglietti avatar alessandro-aglietti commented on July 30, 2024

Hi @alessandro-aglietti,

Quick heads up about the new google ads api: it's so slow that the client that I'm working with decided to switch to adwords api.

Just a quick comparison: for pulling 10k keywords from the AdGroups takes about 30s - 1 minute while with the adwords api, it takes 4-5 seconds. :)

Yeah.. there is also a back to beta statement on https://developers.google.com/google-ads/api/docs/start.
For the moment we only need the offline conversion, we didn't expect to ran in performance problems.

Anyway, thank you for the hint!

from google-ads-api.

alessandro-aglietti avatar alessandro-aglietti commented on July 30, 2024

@avermeil here you find our first working version. We've some little fix (naming & docs) to be addressed before opening a PR to this main repo.
In the meantime can you check if our implementation is ok for you?

Btw I've a question about the circle-ci, the project is configured to use dotenv but the yml config didn't create the .env causing failing of the build.
Is ok if we update the circle-ci yml to create a .env from circle-ci envs?

from google-ads-api.

wcoots avatar wcoots commented on July 30, 2024

At Opteo we don't use this authentication method so we do not currently support it. However we are aware that this is a desired feature so we will be looking into it in the future.

from google-ads-api.

felixmosh avatar felixmosh commented on July 30, 2024

The work with refreshToken is hard when you don't need user interactions.
refreshTokens do expires.

There is an article regarding using service accounts and google ads with code snippets in some languages,
https://developers.google.com/google-ads/api/docs/oauth/service-accounts

Maybe this can help.

from google-ads-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.