# OAuthError 'access\_denied: You are accessing from an invalid application'

**URL:** <https://community.auth0.com/t/oautherror-access-denied-you-are-accessing-from-an-invalid-application/167905>\
**Category:** Get Help\
**Tags:** configuration, application\
**Created:** [January 8, 2025, 2:04pm UTC](https://community.auth0.com/t/oautherror-access-denied-you-are-accessing-from-an-invalid-application/167905 "2025-01-08T14:04:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![juan.motta](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/juan.motta/32/70086_2.png) [@juan.motta](https://community.auth0.com/u/juan.motta)\
**Post date:** [January 8, 2025, 2:04pm UTC](https://community.auth0.com/t/oautherror-access-denied-you-are-accessing-from-an-invalid-application/167905/1 "2025-01-08T14:04:21Z")

</div>

Hi everyone,

I’m currently working on integrating OAuth authentication into my Django application using Authlib and have run into an issue I’m hoping to get some help with.

When I try to handle the OAuth callback, I receive the following error:

sqlCopy code

```auto
OAuthError at /oidc/callback/
access_denied: You are accessing from an invalid application. Contact support.

```

Here’s the traceback for additional context:

scssCopy code

```auto
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 55, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/code/apps/auth/views.py", line 79, in callback
    token = oauth.auth0.authorize_access_token(request)
  File "/usr/local/lib/python3.8/site-packages/authlib/integrations/django_client/apps.py", line 67, in authorize_access_token
    raise OAuthError(error=error, description=description)
authlib.integrations.base_client.errors.OAuthError: access_denied: You are accessing from an invalid application. Contact support.

```

 ![image](https://global.discourse-cdn.com/auth0/original/3X/9/0/903bd663a1064cfb793380777456f5a6af0a3d65.png)

### What I’ve Tried:

1. Confirmed that my **Client ID** and **Client Secret** match those provided by my OAuth provider.
2. Verified that the **callback URL** in the OAuth provider settings matches my application.
3. Checked that the application type is set correctly in the provider’s dashboard.
4. Ensured that the necessary **scopes** are allowed in the provider settings.
5. Tested using different browsers and cleared cookies to rule out local issues.

Despite these checks, I’m still encountering the error. Has anyone else faced this issue or have suggestions on what else I can investigate?

Any help would be greatly appreciated!

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![marybeth.hunter](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marybeth.hunter/32/61955_2.png) [@marybeth.hunter](https://community.auth0.com/u/marybeth.hunter)\
**Post date:** [January 8, 2025, 3:23pm UTC](https://community.auth0.com/t/oautherror-access-denied-you-are-accessing-from-an-invalid-application/167905/3 "2025-01-08T15:23:13Z")

</div>

Hi @juan.motta,

Welcome to the Auth0 Community!

This error is coming from your action called “Add Metadata Flow” on line 36. You’re using `api.access.deny` with the message of “You are accessing from an invalid application. Contact support.” Can you take a closer look at this action? I recommend using the Real-time Webtask Logs Extension to debug any extensibility code: [Real-time Webtask Logs Extension](https://auth0.com/docs/customize/extensions/real-time-webtask-logs)

Thanks,

Mary Beth

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [January 22, 2025, 3:23pm UTC](https://community.auth0.com/t/oautherror-access-denied-you-are-accessing-from-an-invalid-application/167905/5 "2025-01-22T15:23:51Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
