I just started to learn about Google Analytics Embed API from " https://developers.google.com/analytics/devguides/reporting/embed/v1/getting-started "
I followed their example, and deployed my HTML file onto local Tomcat server hosting at port 8080. I've added everything they mentioned including the whitelists for the host origin etc, provided my OAuth 2.0 key
when I hit my HTML page and logged in with google, I keep on getting 403 error when requesting for " https://content.googleapis.com/analytics/v3/management/accountSummaries?max-results=0&_src=embed-api%3Av1 "
Anybody has any suggestions where I might have gone wrong?
ps the only thing I see on my page after login with Google is "You are logged in as: ***********@gmail.com"
Thanks,
Shen
Upon checking your link, I can see that the error code is 401. Regarding that error, you can check this SO thread .
I think you need to set up a service account as advised in answer.
By setting up a service account in Google apis console it will allow you to access your own data with out needing to login and autenticate the code all the time.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.