# Okta token endpoint returning a 401 error

**URL:** <https://devforum.okta.com/t/okta-token-endpoint-returning-a-401-error/12889>\
**Category:** OAuth/OIDC\
**Created:** [February 11, 2021, 7:02pm UTC](https://devforum.okta.com/t/okta-token-endpoint-returning-a-401-error/12889 "2021-02-11T19:02:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gchheda](https://avatars.discourse-cdn.com/v4/letter/g/8edcca/32.png) [@gchheda](https://devforum.okta.com/u/gchheda)\
**Post date:** [February 11, 2021, 7:02pm UTC](https://devforum.okta.com/t/okta-token-endpoint-returning-a-401-error/12889/1 "2021-02-11T19:02:32Z")

</div>

Hi,

I have integrated the Okta widget based approach for my Vue application.

The entire end to end authentication user flow seems to work as desired when testing with my personal developer account as well as the client’s own Okta domain account.

The client recently purchased a new tenant and after setting up the application just as done previously, the exact same authentication user flow got blocked during the callback due to a **401 response** from the POST request to the **oauht2/default/v1/tokens** endpoint.

This request is initiated by Okta’s Vue library itself and is a part of the callback user flow. I have never encountered this error before.

Please help.

Thanks!

---

<div class="post-metadata">

**Author:** ![gpadma](https://avatars.discourse-cdn.com/v4/letter/g/858c86/32.png) [@gpadma](https://devforum.okta.com/u/gpadma)\
**Post date:** [February 12, 2021, 12:14am UTC](https://devforum.okta.com/t/okta-token-endpoint-returning-a-401-error/12889/2 "2021-02-12T00:14:06Z")

</div>

Hi @gchheda,

Could you share the subdomain of the okta org having issues ?

Are you able to access the OAuth or OIDC metadata endpoints ?

OAuth metadata:  
https://{yourOktaDomain}/oauth2/{authServerId}/.well-known/oauth-authorization-server

OIDC metadata: https:// **{yourOktaDomain}/oauth2/{authServerId}** /.well-known/openid-configuration

If you have issues with sharing your details here, please open a Support case with Okta.

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [January 26, 2024, 7:25pm UTC](https://devforum.okta.com/t/okta-token-endpoint-returning-a-401-error/12889/3 "2024-01-26T19:25:18Z")

</div>


