I am trying to use this code to access my Google Analytics API, but after running the code I get this error
Error in init_oauth2.0(self$endpoint, self$app, scope = self$params$scope. Unauthorized (HTTP 401). Failed to get an access token.
install.packages("RGoogleAnalytics")
install.packages("googleAuthR")
library(RGoogleAnalytics)
# Authorize the Google Analytics account
client.id <- "########################.com"
client.secret <- "#################_TknUI"
token<-Auth(client.id,client.secret)