On the website https://code.google.com/apis/console I have registered my application, set up generated Client ID: and Client Secret to my a
In my case it was www
and non-www
URL. Actual site had www
URL and the Authorized Redirect URIs in Google Developer Console had non-www
URL. Hence, there was mismatch in redirect URI. I solved it by updating Authorized Redirect URIs
in Google Developer Console to www
URL.
Other common URI mismatch are:
http://
in Authorized Redirect URIs and https://
as actual URL, or vice-versahttp://example.com/
) in Authorized Redirect URIs and not using trailing slash (http://example.com
) as actual URL, or vice-versaHere are the step-by-step screenshots of Google Developer Console so that it would be helpful for those who are getting it difficult to locate the developer console page to update redirect URIs.
Go to https://console.developers.google.com
Select your Project
- Click on the menu icon
- Click on
API Manager
menu
- Click on
Credentials
menu. And underOAuth 2.0 Client IDs
, you will find your client name. In my case, it isWeb Client 1
. Click on it and a popup will appear where you can edit Authorized Javascript Origin and Authorized redirect URIs.
Here is a Google article on creating project and client ID.