# authlib.integrations.base\_client.errors.OAuthError: access\_denied: Unauthorized

**URL:** <https://community.auth0.com/t/authlib-integrations-base-client-errors-oautherror-access-denied-unauthorized/186184>\
**Category:** Get Help\
**Tags:** configuration, application\
**Created:** [May 1, 2025, 8:55am UTC](https://community.auth0.com/t/authlib-integrations-base-client-errors-oautherror-access-denied-unauthorized/186184 "2025-05-01T08:55:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jameslamini](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jameslamini/32/71057_2.png) [@jameslamini](https://community.auth0.com/u/jameslamini)\
**Post date:** [May 1, 2025, 8:55am UTC](https://community.auth0.com/t/authlib-integrations-base-client-errors-oautherror-access-denied-unauthorized/186184/1 "2025-05-01T08:55:27Z")

</div>

Getting error on login with Google for testing application.  
The other applications are fine.

INFO: 10.42.3.101:50334 - “GET /v1/auth/auth?code=S6r91jlTaOB\_ivD1KB\_ZPnmLSchTbuCfl8pJILa3eDufy&state=imahjIFhrOSRBFyiVPHAl24moYGVlH HTTP/1.1” 500 Internal Server Error  
ERROR: Exception in ASGI application  
Traceback (most recent call last):  
File “/opt/conda/envs/py\_3.10/lib/python3.10/site-packages/uvicorn/protocols/http/httptools\_impl.py”, line 409, in run\_asgi  
result = await app( # type: ignore[func-returns-value]  
File “/opt/conda/envs/py\_3.10/lib/python3.10/site-packages/uvicorn/middleware/proxy\_headers.py”, line 60, in **call**  
return await self.app(scope, receive, send)  
File “/opt/conda/envs/py\_3.10/lib/python3.10/site-packages/fastapi/applications.py”, line 290, in **call**  
await super(). **call** (scope, receive, send)  
File “/opt/conda/envs/py\_3.10/lib/python3.10/site-packages/starlette/applications.py”, line 122, in **call**  
await self.middleware\_stack(scope, receive, send)  
File “/opt/conda/envs/py\_3.10/lib/python3.10/site-packages/starlette/middleware/errors.py”, line 184, in **call**  
raise exc  
File “/opt/conda/envs/py\_3.10/lib/python3.10/site-packages/starlette/middleware/errors.py”, line 162, in **call**  
await self.app(scope, receive, \_send)  
File “/opt/conda/envs/py\_3.10/lib/python3.10/site-packages/starlette/middleware/cors.py”, line 83, in **call**  
await self.app(scope, receive, send)  
File “/opt/conda/envs/py\_3.10/lib/python3.10/site-packages/starlette/middleware/sessions.py”, line 86, in **call**  
await self.app(scope, receive, send\_wrapper)  
File “/opt/conda/envs/py\_3.10/lib/python3.10/site-packages/starlette/middleware/exceptions.py”, line 79, in **call**  
raise exc  
File “/opt/conda/envs/py\_3.10/lib/python3.10/site-packages/starlette/middleware/exceptions.py”, line 68, in **call**  
await self.app(scope, receive, sender)  
File “/opt/conda/envs/py\_3.10/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py”, line 20, in **call**  
raise e  
File “/opt/conda/envs/py\_3.10/lib/python3.10/site-packages/fastapi/middleware/asyncexitstack.py”, line 17, in **call**  
await self.app(scope, receive, send)  
File “/opt/conda/envs/py\_3.10/lib/python3.10/site-packages/starlette/routing.py”, line 718, in **call**  
await route.handle(scope, receive, send)  
File “/opt/conda/envs/py\_3.10/lib/python3.10/site-packages/starlette/routing.py”, line 276, in handle  
await self.app(scope, receive, send)  
File “/opt/conda/envs/py\_3.10/lib/python3.10/site-packages/starlette/routing.py”, line 66, in app  
response = await func(request)  
File “/opt/conda/envs/py\_3.10/lib/python3.10/site-packages/fastapi/routing.py”, line 241, in app  
raw\_response = await run\_endpoint\_function(  
File “/opt/conda/envs/py\_3.10/lib/python3.10/site-packages/fastapi/routing.py”, line 167, in run\_endpoint\_function  
return await dependant.call(\*\*values)  
File “/app/lamini/infra/lamini\_infra/powerml\_api/fastapi/routers/auth\_router.py”, line 66, in authorize\_oidc  
token = await client.authorize\_access\_token(request)  
File “/opt/conda/envs/py\_3.10/lib/python3.10/site-packages/authlib/integrations/starlette\_client/apps.py”, line 88, in authorize\_access\_token  
token = await self.fetch\_access\_token(\*\*params, \*\*kwargs)  
File “/opt/conda/envs/py\_3.10/lib/python3.10/site-packages/authlib/integrations/base\_client/async\_app.py”, line 133, in fetch\_access\_token  
token = await client.fetch\_token(token\_endpoint, \*\*params)  
File “/opt/conda/envs/py\_3.10/lib/python3.10/site-packages/authlib/integrations/httpx\_client/oauth2\_client.py”, line 176, in \_fetch\_token  
return self.parse\_response\_token(resp)  
File “/opt/conda/envs/py\_3.10/lib/python3.10/site-packages/authlib/oauth2/client.py”, line 419, in parse\_response\_token  
raise self.oauth\_error\_class(  
authlib.integrations.base\_client.errors.OAuthError: access\_denied: Unauthorized

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [May 2, 2025, 4:56pm UTC](https://community.auth0.com/t/authlib-integrations-base-client-errors-oautherror-access-denied-unauthorized/186184/3 "2025-05-02T16:56:05Z")

</div>

Hi @jameslamini

Welcome to the Auth0 Community!

Could you please let me know if you are using Auth0 dev keys or the ones provided by google?

Also, what kind of SDK are you using and what kind of tenant are you using for testing (dev, staging, prod)?

Are you using the default google connection that was created for your tenant or are you using a new one?

Kind Regards,  
Nik
