2

Here i am using Google apps script ,I want to use Google picker API to fetch my driver files and folders.

https://console.developers.google.com used to create credentials

But i don't know what will be the "JavaScript redirect URL " for creating the client id .Since i am executing this script from the script editor(Google drive -> new > google sheet -> tools ->script editor ).

enter image description here

Please help to resolve this problem...

3
  • redirect_uri is anything ok. For example, it's "http://localhost:8000". But if you want to get the code on the page, when you select Application type, please select "Other". For "Other", redirect_uri is "urn:ietf:wg:oauth:2.0:oob". When you access to oauth URL using the redirect_uri, you can see the code on the page. Access token got from Google OAuth2 is same for all "Application type". Commented Feb 15, 2017 at 8:27
  • Thank you for the valuable answer...but are you telling about the client id creation ? while selecting other option for client id creation there is no option to enter the redirect_uri... Commented Feb 16, 2017 at 12:34
  • For "Other", although there is no option, when you get an authorization code response, you can use "urn:ietf:wg:oauth:2.0:oob" as redirect_uri. you can see here. And if you selected "Other", you can get client ID at that time. Commented Feb 16, 2017 at 22:04

1 Answer 1

1

For the File Picker, you should create a simple API key in the Google Console and enter these domains for the referrer.

*.google.com
*.googleusercontent.com
Sign up to request clarification or add additional context in comments.

1 Comment

while creating an api key from google console there is no option yo enter the domain right? could you please guide me to resolve this problem .Actually i want to upload file from my google sites in to google drive ,for that first i will create apps script N will publish this as web app and will use this url in my google classic site .if you have any idea please help.I could able to display this file picker in spread sheet.but i want this as web app.i dont want to display it from google sheet

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.