Share this question

Welcome to Teachnovice Q&A, where you can ask questions and receive answers from other members of the community.

This is a collaboratively edited question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Error: invalid_client when following five minute quick start for PHP?

0 like 0 dislike

I am trying the "Five minute quick start" ( ) and have followed all instructions up to step 4 "Run the sample". (I have changed the client ID and secret in the sample php code - I've followed the instrictions in text and watched the video to be sure I didn't miss anything). When I run the script from command line, I am indeed provided with a link to follow - such as this:

But when I point my browser there (logged into Google console) I consistently get an error:

Error: invalid_client ... and the details are:


I've tried deleting the client ID and re-creating, but I keep running into the same error. Any suggestions on what could be going wrong? Thanks.

asked Jan 24, 2015 by user2070042  
retagged Jan 24, 2015
It's strange, if I simply replace the client ID in this URl with one of my test client ID it works correctly. Could you take a screenshot of your client ID credentials in the APIs Console and upload it online please? (just make sure your hide the secret... or simply delete that credentials afterwards) PS: you are not the forst one to repport this so something must be wrong somewhere...
Not sure how to upload screenshot - but here's a copy/paste from Console:Client ID for installed applications Client ID: Client secret: *** Redirect URIs: urn:ietf:wg:oauth:2.0:oob localhost
Issue on our side! We'll keep you updated!
Just wanted to let you know we're aware of the issue and working to resolve it
Not working for me yet, though the interaction has changed. Now I get an allow/deny page and I allow. It then redirects me with a URL like this: localhost/?code=4/… ... and when I try to use parts of the URL in answer to the prompt "Please enter the auth code:", I get fatal errors [Google_authException - Google_OAuth2.php:113]

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.