Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google API: Not a valid origin for the client: url has not been whitelisted for client ID "ID"

People also ask

How do I whitelist origin on Google API?

Please go to https://console.developers.google.com/apis/credentials, click on the 'edit' button of your Client ID, and add your site to the origin whitelist.

How do you register the origin for your project client ID?

Please go to https://console.developers.google.com/ and register this origin for your project's client ID.”

What is Google client ID?

The Client ID (cid) is a unique identifier for a browser–device pair that helps Google Analytics link user actions on a site. By default, Google Analytics determines unique users using this parameter. However, what in Google Analytics reports are called users would be worth calling browsers.


I cleared cache. Started working then.

In Chrome: Settings --> Advanced --> Clear browsing data --> Cached images and files


Had the same problem and here's how I solved it:

  1. Activate both Analytics and Google Plus APIs on your project
  2. Create new OAUTH 2.0 client credentials
    • Add the Authorized Javascript Origins under Restrictions section
  3. Use the new client id.

Enjoy.


Clearing the cache did the trick for me


Try Clearing cache it could be issue with cache/localstorage.


For me, it worked without adding any of the additional APIs like google analytics. Just make sure to add the complete clientid and open the app in incognito window to avoid saving the cache. If already have opened the app in regular window, 1- Close all tabs that app is open at. 2- Clear the cache and cookies. In chrome, its in Settings --> Passwords and forms -> Clear Browsing data -> Advanced (tab) -> select a) Cookies and other site data and b) Cached images and files 3- Open a fresh incognito window and test your app.