# Google OAuth issues

**URL:** <https://forum.mattermost.com/t/google-oauth-issues/22855>\
**Category:** Uncategorized\
**Created:** [March 17, 2025, 7:56pm UTC](https://forum.mattermost.com/t/google-oauth-issues/22855 "2025-03-17T19:56:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zgordan-vv](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/zgordan-vv/32/2739_2.png) [@zgordan-vv](https://forum.mattermost.com/u/zgordan-vv)\
**Post date:** [March 17, 2025, 7:56pm UTC](https://forum.mattermost.com/t/google-oauth-issues/22855/1 "2025-03-17T19:56:23Z")

</div>

Hi, we’ve got an error when using Google OAuth. We activated the free trial of the Mattermost Enterprise license and set up the Google OAuth as described here:

> **[Google Single Sign-On - Mattermost documentation](https://docs.mattermost.com/onboard/sso-google.html)**

But now when trying to log in with a Google account, we get the Bad response from token request error.

mattermost.log contains:

{“timestamp”:“2025-03-17 15:02:50.264 Z”,“level”:“error”,“msg”:“Bad response from token request.”,“caller”:“web/context.go:123”,“path”:“/signup/google/complete”,“request\_id”:“r4s7bodeo3npzjc56usjjc4raw”,“ip\_addr”:“127.0.0.1”,“user\_id”:“”,“method”:“GET”,“err\_where”:“AuthorizeOAuthUser”,“http\_code”:500,“error”:“AuthorizeOAuthUser: Bad response from token request., response\_body={\n "error": "redirect\_uri\_mismatch",\n "error\_description": "Bad Request"\n}, status\_code=400, error=”}  
{“timestamp”:“2025-03-17 15:02:53.797 Z”,“level”:“warn”,“msg”:“Error while creating session for user access token”,“caller”:“app/session.go:113”,“error”:“createSessionForUserAccessToken: Invalid or missing token., resource "UserAccessToken" not found, id: token=”}

while redirect\_uri match our website url:

> **[Mattermost](https://chat.flf.org/signup/google/complete)**

The mattermost is running on the Ubuntu Server.

---

<div class="post-metadata">

**Author:** ![john.combs](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/john.combs/32/7118_2.png) [@john.combs](https://forum.mattermost.com/u/john.combs)\
**Post date:** [March 18, 2025, 7:43pm UTC](https://forum.mattermost.com/t/google-oauth-issues/22855/2 "2025-03-18T19:43:48Z")

</div>

Thanks for reaching out, Vyacheslav! The error indicates a possible `redirect_uri` mismatch. Please double-check that the redirect URI from your Mattermost OAuth settings matches exactly what’s configured in the Google API Console (e.g., [https://chat.flf.org/signup/google/complete](https://chat.flf.org/signup/google/complete)). You can find setup details in our [Google Single Sign-On documentation](https://docs.mattermost.com/onboard/sso-google.html). Let us know if you need more help!

---

<div class="post-metadata">

**Author:** ![zgordan-vv](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/zgordan-vv/32/2739_2.png) [@zgordan-vv](https://forum.mattermost.com/u/zgordan-vv)\
**Post date:** [March 20, 2025, 6:35pm UTC](https://forum.mattermost.com/t/google-oauth-issues/22855/3 "2025-03-20T18:35:43Z")

</div>

Hi John, thank you for the response. I tried it in the first place and it did not work.
