Google Analytics API: “User does not have sufficient permissions for this account.”

后端 未结 9 2003
谎友^
谎友^ 2020-12-05 09:16

I\'m writing a Ruby app that accesses the Google Analytics API to pull down some experiment information.

The app connects and authenticates using a Google Service Ac

9条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-05 10:12

    Even after adding the email to the account level in analytics I still had the same permission problem but the following suggestion helped but didn't solve it:

    $client->setScopes("https://www.googleapis.com/auth/plus.login");

    That didn't work for me but this did:

    $client->setScopes("https://www.googleapis.com/auth/analytics");

    https:// is now required to authenticate.

提交回复
热议问题