# Login Failure: Failed to exchange token: oauth2: "invalid\_grant" "Invalid authorization code"

**URL:** <https://community.sambanova.ai/t/login-failure-failed-to-exchange-token-oauth2-invalid-grant-invalid-authorization-code/1681>\
**Category:** Discussion\
**Tags:** dev\
**Created:** [July 2, 2026, 3:53pm UTC](https://community.sambanova.ai/t/login-failure-failed-to-exchange-token-oauth2-invalid-grant-invalid-authorization-code/1681 "2026-07-02T15:53:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryan1](https://sea1.discourse-cdn.com/sambanova/user_avatar/community.sambanova.ai/ryan1/32/3213_2.png) [@ryan1](https://community.sambanova.ai/u/ryan1)\
**Post date:** [July 2, 2026, 3:53pm UTC](https://community.sambanova.ai/t/login-failure-failed-to-exchange-token-oauth2-invalid-grant-invalid-authorization-code/1681/1 "2026-07-02T15:53:03Z")

</div>

Hello Support Team,

I am unable to log into my SambaNova Cloud account and am repeatedly getting blocked by an authentication error during the sign-in process.

Error Message: “Failed to exchange token: oauth2: “invalid\_grant” “Invalid authorization code””

Troubleshooting steps I have already tried:

1. Attempted login via a private/Incognito browser window.

2. Cleared browser cookies and cache entirely.

3. Verified that my local device system clock is fully synchronized.

4. Ensured no browser extensions or ad-blockers are active on the page.

Because this error happens during the OAuth exchange phase, I cannot access my dashboard to submit an internal ticket or regenerate credentials. Could a system administrator please check my profile metadata to see if my account state or token fields need a manual reset?

Thank you for your help!

---

<div class="post-metadata">

**Author:** ![saurabh.patil](https://sea1.discourse-cdn.com/sambanova/user_avatar/community.sambanova.ai/saurabh.patil/32/1908_2.png) [@saurabh.patil](https://community.sambanova.ai/u/saurabh.patil)\
**Post date:** [July 2, 2026, 4:51pm UTC](https://community.sambanova.ai/t/login-failure-failed-to-exchange-token-oauth2-invalid-grant-invalid-authorization-code/1681/2 "2026-07-02T16:51:13Z")

</div>

Hi,  
Thank you for reporting the issue.  
We have received your request and are investigating the authentication error. We’ll review your account and provide an update as soon as we have more information.  
Thank you for your patience.

---

<div class="post-metadata">

**Author:** ![neeraj.26jan](https://sea1.discourse-cdn.com/sambanova/user_avatar/community.sambanova.ai/neeraj.26jan/32/3214_2.png) [@neeraj.26jan](https://community.sambanova.ai/u/neeraj.26jan)\
**Post date:** [July 3, 2026, 11:14am UTC](https://community.sambanova.ai/t/login-failure-failed-to-exchange-token-oauth2-invalid-grant-invalid-authorization-code/1681/3 "2026-07-03T11:14:24Z")

</div>

Hi. I am facing the same issue "Failed to exchange token: oauth2: “invalid\_grant” “Invalid authorization code”.

---

<div class="post-metadata">

**Author:** ![saurabh.patil](https://sea1.discourse-cdn.com/sambanova/user_avatar/community.sambanova.ai/saurabh.patil/32/1908_2.png) [@saurabh.patil](https://community.sambanova.ai/u/saurabh.patil)\
**Post date:** [July 6, 2026, 6:51am UTC](https://community.sambanova.ai/t/login-failure-failed-to-exchange-token-oauth2-invalid-grant-invalid-authorization-code/1681/5 "2026-07-06T06:51:41Z")

</div>

Hi @ryan1  
We have checked from our side, and it appears that the issue has been resolved.  
Could you please check again and let us know if you are still experiencing the issue?

---

<div class="post-metadata">

**Author:** ![saurabh.patil](https://sea1.discourse-cdn.com/sambanova/user_avatar/community.sambanova.ai/saurabh.patil/32/1908_2.png) [@saurabh.patil](https://community.sambanova.ai/u/saurabh.patil)\
**Post date:** [July 6, 2026, 9:02am UTC](https://community.sambanova.ai/t/login-failure-failed-to-exchange-token-oauth2-invalid-grant-invalid-authorization-code/1681/6 "2026-07-06T09:02:09Z")

</div>

Hi @neeraj.26jan ,  
We have checked from our side, and it appears that the issue has been resolved.  
Could you please check again and let us know if you are still experiencing the issue?

---

<div class="post-metadata">

**Author:** ![aj1](https://sea1.discourse-cdn.com/sambanova/user_avatar/community.sambanova.ai/aj1/32/3229_2.png) [@aj1](https://community.sambanova.ai/u/aj1)\
**Post date:** [July 14, 2026, 1:42pm UTC](https://community.sambanova.ai/t/login-failure-failed-to-exchange-token-oauth2-invalid-grant-invalid-authorization-code/1681/7 "2026-07-14T13:42:45Z")

</div>

I am facing the same issue and our environment is down.

Thx for your help
