Client is unauthorized to retrieve access tokens using this method

前端 未结 1 1006
野性不改
野性不改 2020-12-20 05:23

I have a custom dashboard in Ruby on Rails project with data collected from Google Analytics. I user Google Analytics Reporting V4 API and a Service Account to authenticate.

相关标签:
1条回答
  • 2020-12-20 05:48

    Remember that a service account is a dummy user. For a service account to be able to access your google analytics account it needs to be preauthorized. You authorize the service account just like you would any other user. You will need to add the service account as a user via the Google Analytics website you need to do this at the ACCOUNT level it must be the ACCOUNT level.

    I am not sure I understand what you are doing as far as impersonation is going. I am not a ruby dev but your code doesn't look like the sample I found here.

    0 讨论(0)
提交回复
热议问题