Search code examples
google-drive-api

I have 2 unclear fields in console for Google Drive


Adding Create OAuth client ID in google console for Google Drive I encountered 2 unclear parameters : Authorized redirect URIs and Authorized JavaScript origins: Having home page of my site as

https://tads.my-demo-apps.tk

I filled with some url for this site : https://prnt.sc/ydQ2NCQO9Isu My site has not any pages with such urls, but I can add them later.

Which urls these pages must have ?

Thanks!


Solution

  • For the redirect URIs you can check on the documentation on Create authorization credentials from Using OAuth 2.0 for Web Server Applications:

    The redirect URIs are the endpoints to which the OAuth 2.0 server can send responses. These endpoints must adhere to Google’s validation rules.

    And the javascript origins are explained on Create authorization credentials from OAuth 2.0 for Client-side Web Applications:

    Applications that use JavaScript to make authorized Google API requests must specify authorized JavaScript origins. The origins identify the domains from which your application can send requests to the OAuth 2.0 server. These origins must adhere to Google’s validation rules.