Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Drive API OAuth 2.0; Error: origin_mismatch [closed]

Tags:

People also ask

How do I authenticate Google Drive?

In the search results, click Google Drive API, and then click Enable API. In the menu on the left, click Credentials. In the OAuth Consent Screen tab, enter a valid email address and application name, and click Save. In the Credentials tab, click Add credentials, and select OAuth client ID .


I'm having trouble creating a valid google drive API for my website. I may sound like a complete noob, but I created a file called quickstart.html in my main ftp directory and copied and pasted the code from https://developers.google.com/drive/quickstart-js#step_1_enable_the_drive_api and replaced the client id with my client id, and in my settings I set the Javascript Origins URL to my main url (www.domainname.com), I have a separate index page for that domain, so to access google drive do I just go to http://domainname.com/quickstart.html? Because when I do that and click "Authorize" I get the google Origin Mismatch error. Can anyone help me please?