# V1/token endpoint receiving CORS error

**URL:** <https://devforum.okta.com/t/v1-token-endpoint-receiving-cors-error/18747>\
**Category:** Questions\
**Tags:** react\
**Created:** [January 3, 2022, 10:51pm UTC](https://devforum.okta.com/t/v1-token-endpoint-receiving-cors-error/18747 "2022-01-03T22:51:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gbulmer](https://avatars.discourse-cdn.com/v4/letter/g/5f8ce5/32.png) [@gbulmer](https://devforum.okta.com/u/gbulmer)\
**Post date:** [January 3, 2022, 10:51pm UTC](https://devforum.okta.com/t/v1-token-endpoint-receiving-cors-error/18747/1 "2022-01-03T22:51:04Z")

</div>

Only my dev account has this issue. Our Okta preview account is working correctly.

**Endpoint** : [https://dev-xxx.okta.com/oauth2/default/v1/token](https://dev-xxx.okta.com/oauth2/default/v1/token)  
**origin** : [https://localhost:3000](https://localhost:3000) – which is in the allowed origins in Okta account with both CORS and Redirect enabled.

**Error** :  
Access to fetch at ‘[https://dev-xxxx.okta.com/oauth2/default/v1/token](https://dev-xxxx.okta.com/oauth2/default/v1/token)’ from origin ‘[https://localhost:3000](https://localhost:3000)’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.

My dev account is on [Version 2021.12.1 C]

---

<div class="post-metadata">

**Author:** ![tyty](https://avatars.discourse-cdn.com/v4/letter/t/35a633/32.png) [@tyty](https://devforum.okta.com/u/tyty)\
**Post date:** [January 4, 2022, 9:29pm UTC](https://devforum.okta.com/t/v1-token-endpoint-receiving-cors-error/18747/2 "2022-01-04T21:29:34Z")

</div>

Silly, but I’ve seen this pop up a few times where the trusted origin is `https` whereas the actual localhost url is `http`

You might also want to confirm that the default server `https://dev-xxxx.okta.com/oauth2/default/.well-known/openid-configuration` exists - A missing SKU (API Access Management) can also cause this.

---

<div class="post-metadata">

**Author:** ![gbulmer](https://avatars.discourse-cdn.com/v4/letter/g/5f8ce5/32.png) [@gbulmer](https://devforum.okta.com/u/gbulmer)\
**Post date:** [January 11, 2022, 1:55pm UTC](https://devforum.okta.com/t/v1-token-endpoint-receiving-cors-error/18747/3 "2022-01-11T13:55:25Z")

</div>

It ended up being a wrong clientid in our configuration. Thanks for the response!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [January 12, 2022, 9:26pm UTC](https://devforum.okta.com/t/v1-token-endpoint-receiving-cors-error/18747/4 "2022-01-12T21:26:06Z")

</div>

Closed on January 12, 2022, 9:26pm UTC

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