0

While using googleAnalyticsR api, I was authenticating using "ga_auth(token = "my token.httr-oauth") and running scripts in my computer and server perfectly fine. When I ran this scripts in production mode (using CRON), I've started to get this error:

"Error: The default Google Cloud Project for googleAnalyticsR is intended 
for evalutation only, not production scripts... "

I followed instructions and created my own project, downloaded the json file, and set it before calling library(googleAnalyticsR):

gar_set_client(json = "/home/path/client_secret_XXXX-XXXXXX.apps.googleusercontent.com.json") 2019-11-05 10:41:56> Setting client.id from /home/path/client_secret_XXXX-XXXXXX.apps.googleusercontent.com.json [1] "my_analytics-export"

I believe I am being unable to tell the API to use this project instead of generic, as I am getting the same error I got at the beginning.

Does anyone knows how??? This is definitely not my thing... and I am running out of ideas!

Thanks..

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
licmantia
  • 3
  • 1

1 Answers1

0

You need to create a new token once you registered your own GCP project. So move/delete your existing token "my_token.httr-oauth" and then load your client, and recreate your token.

However, if you are using the latest googleAnaltyicsR version 0.7.1 then you do not need to create a token, it will create a token under your email.

MarkeD
  • 2,500
  • 2
  • 21
  • 35