node-samples
node-samples copied to clipboard
400. That’s an error. Error: invalid_request
Expected Behavior
after run node . links genere but not working Authorize this app by visiting this url: https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcalendar.readonly&response_type=code&client_id=xxxxxxxxxxxxxxxxxxxxx6.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob Enter the code from that page here:
Actual Behavior
- That’s an error.
Error: invalid_request
Missing required parameter: redirect_uri
Learn more
Request Details That’s all we know.
Steps to Reproduce the Problem
- put code in index.js
- node .
Specifications
- v8.10.0
- OS (/Linux/ ubunut)
I'm not able to reproduce this without intentionally omitting the redirect_uri in the URL when copy/pasting. Are you sure you copied the URL into the browser correctly?
Hi I have the same problem.
- That’s an error.
Error: invalid_request
Required parameter is missing: response_type
Learn more
Request Details access_type=offline scope=https://www.googleapis.com/auth/drive
That’s all we know.
Maybe it is true because i am connect at localhost ?
Please post the actual URLs. Note that there's no secret information in the URLs -- the client IDs are considered public info as they're visible to end users in the redirect URL.
For the original issue, tried using same URL with my client ID and it worked fine. Perhaps it's something more with how you're opening the URL? Bad copy/paste into the browser?
you have to add a redirect_uri to your google project on google cloud. the tutorial does not do this or mention it
seems like OAuth key have the redirecturi included. service account does not.