Connection to Google Ads on API via token



  • It would be interesting to know whether a token could be made by which a Google Ads could be connected to API without entering the Google recording, the data from which would need to be API. For the time being, RStudio (and R), using rgoogleads to connect to API Google Ads. After the primary connection to API Google Ads, the entry into the accounting record is requested and the application (a request for access to Google Ads data through Google) to Google Ads control is then required. The AppData/Local/gargle/gargle/Cache then creates a cashed access file (possibly some kind of token). This file works as a token and enables Google Ads on API to work without the need to enter Google records every time and provide permission for the application. But there's one thing, but sometimes this AppData/Local/gargle/Cache file goes missing (or just breaks) and there's a need to re-entry the records and grant permissions for the application. Since it's already happened twice in two weeks, it looks like this scrambled token has a lifetime of fitness after which it no longer fits and requires the creation of a new one. The question had therefore arisen, and was it possible to make a token that had no expiration date or was that very long?

    Like an example, that's what the connection looks like right now.

    library(rgoogleads)
    

    gads_auth_configure(path = '#######Название файла с токеном для настроек######.json')
    gads_auth(
    email = '#####Почта аккаунта с которого получаем данные по API#####@gmail.com',
    developer_token = '#########Токен уровня Базовый доступ###########'
    )

    P.S. For example, the necessary example of the current is now used to connect through the service account to the Google Spreadsheets by means of a googlesheets library.

    library(googlesheets4)
    gs4_auth(path = "hallowed-glider-328412-a4417dc713b0.json")



  • I'm the author of the package. rgoogleads♪ Better ask me questions on this package on GitHub ♪ https://github.com/selesnow/rgoogleads/issues

    Now on your question, for authorization rgoogleads under the hood uses a package. gargleas did the package. googlesheets4♪ But the thing is, Google Sheets API, without any restriction, allows for copying through service lines without using browser. And Google Ads API allows it to be done only with Google Workspace. Details are available https://developers.google.com/google-ads/api/docs/oauth/service-accounts ♪

    In fact, the question is, why do you have zapped tokens? I haven't had a problem working for months, and I've never been out.

    Try to figure out exactly what's going on with the token. In fact, the life of the token is only an hour, the package is automatically updated, and it happens every hour.

    In the authorization process, the documentation of the package can be analysed in detail gargle ♪ https://gargle.r-lib.org/



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2