Do I need special access to get analytics data using the API?

  • 6 March 2020
  • 7 replies
  • 49 views

Do I need special access to get analytics data? I can pull /stats but when I try to get /analytics, I receive a 403 response.

Mary Houston 4 years ago

Hey @jgrace, sorry for the delay - My understanding is that you need to be either an admin or an author in order to see analytics. Can you confirm if you are an author? (you can follow these directions here https://help.getguru.com/articles/ia9RoAXT/Giving-a-User-Author-Permissions)
View original

7 replies

Userlevel 4
Badge
Hey @jgrace, sorry for the delay - My understanding is that you need to be either an admin or an author in order to see analytics. Can you confirm if you are an author? (you can follow these directions here https://help.getguru.com/articles/ia9RoAXT/Giving-a-User-Author-Permissions)
all good, I sorta posted this end of day on a Friday so I understand. I checked with my Team and it looks like I am only a Author.
I've been following the documentation and keep getting a 403 error so I thought it had something to do with my account not being a admin.
I ran a GET with the following url with the correct header authorization info (username and password/api key):
https://api.getguru.com/api/v1/teams/TEAMKEYGOESHERE/analytics?fromDate=2020-02-10+05:00&toDate=2020-02-12+05:00
Talked to support and they suggested:
https://api.getguru.com/api/v1/teams/TEAMKEYGOESHERE/analytics?fromDate=2020-02-10+05:00Z&toDate=2020-02-12+05:00Z
But I am still getting the 403 😕
Userlevel 4
Badge
Thanks for the info - I am working with @jzhang and she is sending a response back in Intercom - hope it works 😊
Thank you! I greatly appreciate the assistance.

Was there a fix for this?

Userlevel 3
Badge

Hey @Derrick Rose! Are you getting an error when hitting the following endpoint?

GET https://api.getguru.com/api/v1/teams/:teamId/analytics

If so, can you confirm whether or not you’re provisioned as an author or an admin?

Thanks!

Joe

I was able to get it working, had to use a collection token vs user token. Also to answer the question I am an author. 

Reply