Reputation: 63
When I try to make a request for Google Analytics data -> Request Status Code: 403, Error: API returned: Insufficient Permission: Request had insufficient authentication scopes.
options(googleAuthR.scopes.selected = "https://www.googleapis.com/auth/analytics.edit")
It work only for the list of Google Analytics accounts. But I got this error on a Google Analytics request
ga_results1 <-google_analytics(ga_id, date_range = c("2020-01-01", "2020-01-31"), metrics = c("users","sessions"), dimensions = "date")
Thanks for answer!
Upvotes: 0
Views: 537
Reputation: 117281
if you check the documentation you will find that the google analytics API v4 and the Google analytics data api GA4 requires one of the following scopes in order to request report data.
Use the proper scope scope and it should work fine.
Upvotes: 1