# Oauth2 Setup with Gmail/Google Workspace

**URL:** <https://forum.inductiveautomation.com/t/oauth2-setup-with-gmail-google-workspace/108799>\
**Category:** Ignition\
**Created:** [July 22, 2025, 11:16pm UTC](https://forum.inductiveautomation.com/t/oauth2-setup-with-gmail-google-workspace/108799 "2025-07-22T23:16:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevin1](https://avatars.discourse-cdn.com/v4/letter/k/a9adbd/32.png) [@kevin1](https://forum.inductiveautomation.com/u/kevin1)\
**Post date:** [July 22, 2025, 11:16pm UTC](https://forum.inductiveautomation.com/t/oauth2-setup-with-gmail-google-workspace/108799/1 "2025-07-22T23:16:44Z")

</div>

I'm having a hard time getting my OAuth2 to work. Right now, I have it at the point where I'm getting the correct token from Google (yay!) but when it tries to **Test Token** it fails every time.

I manually go to the Redirect URL in the request, on my server:  
`https://myserver.com:8043/data/oauth2/client/oauth2/authorize/callback&client_id=xxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com`

My server ALWAYS reports back:

```python
HTTP ERROR 404 Not Found
URI:	/data/oauth2/client/oauth2/authorize/callback&client_id=xxxxxxxxxx.apps.googleusercontent.com
STATUS:	404
MESSAGE:	Not Found

```

The server is an Ubuntu 24.04.2 LTS. I have a working SSL certificate.

My logs inside of Ignition do not seem log anything useful regarding this error.

Any suggestions would be helpful.

---

<div class="post-metadata">

**Author:** ![kevin1](https://avatars.discourse-cdn.com/v4/letter/k/a9adbd/32.png) [@kevin1](https://forum.inductiveautomation.com/u/kevin1)\
**Post date:** [July 23, 2025, 9:21pm UTC](https://forum.inductiveautomation.com/t/oauth2-setup-with-gmail-google-workspace/108799/2 "2025-07-23T21:21:06Z")

</div>

I figured it out. My urls were incorrect.  
Authorization URL: [Sign in - Google Accounts](https://accounts.google.com/o/oauth2/v2/auth)  
Token URL: [https://oauth2.googleapis.com/token](https://oauth2.googleapis.com/token)
