Ask a Question

Swagger UI 2.0 CORS Issue While Accessing Salesforce REST API using Spring Boot

afulz
New Member

Swagger UI 2.0 CORS Issue While Accessing Salesforce REST API using Spring Boot

Hello All,

I am trying to create salesforce REST API documentation using Spring Boot. I have created swagger.yaml files in my SpringBoot, I am able to get swagger UI html using it but when it comes to try out , I am getting below error while access the salesforce APIs.

 

Error:

Access to fetch at 'https://login.salesforce.com/services/oauth2/token' from origin 'http://localhost:8080' 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.

0 REPLIES 0
cancel
Showing results for 
Search instead for 
Did you mean: