Generating bearer token via OAuth 2.0 results in CORS error

Ram Natla
Giga Contributor

When following the below OAuth 2.0 guide, I'm running into a CORS error when requesting the bearer token from the "<instance_name>/oauth_token.do" endpoint. I've followed the previous steps to generate the code and can successfully fetch the bearer token using Postman, but when making the call from my browser I hit the below error

Access to fetch at 'https://devXXXXXX.service-now.com/oauth_token.do' from origin 'https://sandbox-1.reactblade.portal.azure.net' 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.

 

1 REPLY 1

Ram Natla
Giga Contributor