I have enabled the proper API in the Google console. That is not the issue. I need to write a node js app which accesses user's data when they are offline. I have managed to implement oauth2 authorization, and have gotten a refresh_token, which I later used to get a fresh access token.
Now I've gotten to the point of actually accessing the API's themselves. I have this URL which works perfectly when called with curl from the shell:
curl https://www.googleapis.com/calendar/v3/calendars/primary/events?access_token=mytoken
It returns a JSON with all the events, and works constantly. No matter how many times I call it.
Yet the exact same URL fails when pasted in the address bar of any browser.
Here's the response sent by Google:
{
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "dailyLimitExceededUnreg",
"message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.",
"extendedHelp": "https://code.google.com/apis/console"
}
],
"code": 403,
"message": "Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup."
}
}
It also fails with the same exact error when called from the server's side in node js using "request" module as follows:
request('https://www.googleapis.com/calendar/v3/calendars/primary/events?token=mytoken', function(err, httpResponse, body){ /* ..print body or fail.. */ }
All my google-api related searches lead to (almost) the same pages.
Does anyone have any idea what I am doing wrong?