# Getting Invalid authorization code Error

**URL:** <https://community.auth0.com/t/getting-invalid-authorization-code-error/89950>\
**Category:** Get Help\
**Tags:** login, auth0\
**Created:** [September 2, 2022, 6:24pm UTC](https://community.auth0.com/t/getting-invalid-authorization-code-error/89950 "2022-09-02T18:24:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris.lee](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@chris.lee](https://community.auth0.com/u/chris.lee)\
**Post date:** [September 2, 2022, 6:24pm UTC](https://community.auth0.com/t/getting-invalid-authorization-code-error/89950/1 "2022-09-02T18:24:25Z")

</div>

Hi, I’m getting Invalid authorization code error sometimes and not sure what this means.

```auto
{
  "date": "2022-09-02T12:37:57.824Z",
  "type": "feacft",
  "description": "Invalid authorization code",
  "connection_id": "",
  "client_id": "client_id",
  "client_name": "client_name",
  "ip": "ip",
  "user_agent": "Chrome 105.0.0 / Windows 10.0.0",
  "details": {
    "code": " ****************************************** I8G"
  },
  "hostname": "hostname.com",
  "user_id": "",
  "user_name": "",
  "auth0_client": {
    "name": "auth0-spa-js",
    "version": "1.22.2"
  },
  "log_id": "log_id",
  "_id": "_id",
  "isMobile": false,
  "id": "id"
}

```

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [September 2, 2022, 7:31pm UTC](https://community.auth0.com/t/getting-invalid-authorization-code-error/89950/3 "2022-09-02T19:31:55Z")

</div>

Hey @chris.lee !

This can be thrown for a few reasons - In my experience the most common case being that a code is used more than once.

> [@Authorisation code flow: Error 403](https://community.auth0.com/t/authorisation-code-flow-error-403/73029/3):
>
> Hi @jack.cattell, Thanks for reaching out to the Auth0 Community! I understand that you’ve encountered the 403 invalid grant and Invalid authorization code error when requesting the /oauth/token endpoint. This error can happen for a few reasons. The provided authorization code could be invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client. This is described in the OAuth 2.0 error code specification [RFC 6749 - The OAuth…](https://datatracker.ietf.org/doc/html/rfc6749#section-5.2)

Hope this helps!

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [September 17, 2022, 7:32pm UTC](https://community.auth0.com/t/getting-invalid-authorization-code-error/89950/4 "2022-09-17T19:32:12Z")

</div>

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