Error: invalid_client not registered

I installed the Google Drive Real-Time API Sample Files on my web server following these instructions , including creating the client_id in the Cloud Console and pasting into index.html .

When I find this page and click the button to authorize the application, it appears in a new window and shows:

Error: invalid_client
no registered origin

Request Details:

 openid_connect_request=true cookie_policy_enforce=false scope=https://www.googleapis.com/auth/drive.install https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/plus.me response_type=token access_type=online redirect_uri=postmessage proxy=oauth2relay865404532 origin=http://mywebsite.com state=264939258|0.165356673 display=page client_id=1077585001321.apps.googleusercontent.com authuser=0 

I do not see another client_id that should use in the Cloud Console. Does anyone know how to overcome this error? Thank you for your help.

+45
google-drive-sdk google-api google-drive-realtime-api
Oct 28 '13 at 11:28
source share
2 answers

In the new Google API console, configure authorized OAuth2.0 sources from

 Your Project > APIs & auth > Credentials 

You may need to add a new client identifier specifically for the web application (I did this because by default for AppEngine)

 Create Client ID > Web Application > Authorized Javascript origins 

If you are running on a local dev server, just add the exact url, for example:

 http://127.0.0.1:9000 
+60
Jan 21 '14 at 23:19
source share

UPDATE: instead, I changed the accepted answer to Johno Scott, as it refers to a newer version of the console, while my truth was only for the older version.




I solved it. I needed to enter WEB ORIGIN on the OAuth 2.0 client ID screen. In particular, it must be the exact path / url of the index.html file, otherwise it does not correspond to the root domain, which does not work by default.

This screenshot shows you exactly where to enter it:

enter image description here

+15
Oct 28 '13 at 12:33
source share



All Articles