javascript - Google API offline access -


i have enabled proper api in google console. not issue. need write node js app accesses user's data when offline. have managed implement oauth2 authorization, , have gotten refresh_token, later used fresh access token.

now i've gotten point of accessing api's themselves. have url works perfectly when called curl shell:

curl https://www.googleapis.com/calendar/v3/calendars/primary/events?access_token=mytoken

it returns json events, , works constantly. no matter how many times call it.

yet exact same url fails when pasted in address bar of browser.

here's response sent google:

{ "error": {   "errors": [    {     "domain": "usagelimits",     "reason": "dailylimitexceededunreg",     "message": "daily limit unauthenticated use exceeded. continued use requires signup.",     "extendedhelp": "https://code.google.com/apis/console"    }   ],   "code": 403,   "message": "daily limit unauthenticated use exceeded. continued use requires signup."  } } 

it fails same exact error when called server's side in node js using "request" module follows:

request('https://www.googleapis.com/calendar/v3/calendars/primary/events?token=mytoken', function(err, httpresponse, body){ /* ..print body or fail.. */ } 

all google-api related searches lead (almost) same pages.

does have idea doing wrong?

using alternate method proposed google getting consistent results both on curl in shell, , in node: have removed access_token query parameter , adding following header: - "authorization: bearer access_token_here"

works. comments.


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -