Ensure your application is set up according to these instructions steps, especially:
– With a callback URL (I think this can be any URL, actually, even if that’s not best practice…)
– With the scope field set to user
– With the type set to confidential
The access_token is what you need to authenticate. Now, call the API again, but this time send the GET request with an Authorisation header equal to “Bearer removed-1234-5678-9012-000000000000”. You should get the requested data back.
I haven’t been able to get the Explorer to work very well. You can add a Parameter named Authorization with the value Bearer etc and Parameter Type set to Header but I still get 401 errors.
I can usually only get data when sending requests through curl, Python or Postman. And yes, I often get redirected to the dashboard when I load a page or click a button.
Access_token lasts an hour, according to the expiry value (3600 seconds).
API explorer only works with OAuth2 (follow Yvonne’s link). API Key alone will not allow access on query string at all, you must create a Bearer token and send the “Authorize: Bearer xxx” header with your request for the data feed.
implementation via PHP with Google’s PHP package is very easy and straight forward. Speed is also quick as PHP is very good at processing binary data that is returned.