The internet has come a long way from the basic websites and buggy browsers that it used to run. The modern internet is loaded with complex websites and web apps. That said, these sites are still far from perfect and keep running into issues from time to time.
In this article, we’re talking about the “Error 400: redirect_url_mismatch” issue that you can run into on some sites, the reasons behind it and what you can do to fix the problem.
Also read: How to fix “the plain http request was sent to https port”?
What causes this error?
The error mainly occurs when accessing an SSO for Google Sign-ins because the app doesn’t comply with Google’s OAuth 2.0 policy. Other reasons include:
- Internet connectivity issues.
- Typos in the redirect URI.
- Incorrect redirect URLs.
How to fix this?
You can try these x solutions to fix the problem.
Check your internet
If you’re a visitor to the site, check to see if you have a proper internet connection. If you’re on WiFi, make sure you’ve got an active link and that there are no signal issues. On cellular data, ensure that it’s enabled and that you’re getting good network coverage.
Check the redirect URI
Check to see if the redirect URI has been registered in the API’s console and if it has been, whether it was done correctly or not. Check to see the client ID and client secret keys are correct and that the URI/URLs you’re using are all preset and correct as well.
Try multiple URLs
If the aforementioned fixes don’t work or you don’t have access to the Google API console backend, your best bet is to try a number of different URLs that might work for you. Some common variants include:
Also read: How to fix ‘urllib.error.httperror: HTTP error 403: Forbidden’?