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
Try to do these checks:
Enjoy :)
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.
for me it was because in the 'Authorized redirect URIs' list I've incorrectly put https://developers.google.com/oauthplayground/
instead of https://developers.google.com/oauthplayground
(without /
at the end).
Let me complete @Bazyl's answer: in the message I received, they mentioned the URI
"http://localhost:8080/"
(which of course, seems an internal google configuration). I changed the authorized URI for that one,
"http://localhost:8080/"
, and the message didn't appear anymore... And the video got uploaded... The APIS documentation is VERY lame... Every time I have something working with google apis, I simply feel "lucky", but there's a lack of good documentation about it.... :( Yes, I got it working, but I don't yet understand neither why it failed, nor why it worked... There was only ONE place to confirm the URI in the web, and it got copied in the client_secrets.json... I don't get if there's a THIRD place where one should write the same URI... I find nor only the documentation but also the GUI design of Google's api quite lame...
In my case I had to check the Client ID type for web applications/installed applications.
installed applications: http://localhost [Redirect URIs] In this case localhost simply works
web applications: You need valid domain name [Redirect URIs:]
I had two request URIs in the Console, http://xxxxx/client/api/spreadsheet/authredirect and http://localhost.
I tried all the top responses to this question and confirmed that none of them were my problem.
I removed localhost from the Console, updated my client_secret.json in my project, and the mismatch error went away.