CORS Issue | Community
Skip to main content

CORS Issue

  • December 21, 2023
  • 2 replies
  • 0 views

Vinitha

Hi 

I am doing a GET request to this api - 

/api/v2/help_center/community_posts/search
 
With basic authorization (email/token:apitoken)
and getting CORS error in the browser.
The above works on Postman though.
 
Any suggestions please ?

2 replies

Vinitha
  • Author
  • December 21, 2023

Further to above this is the CORS policy error I am getting while making a Basic API request (not OAuth)

Access to fetch at 'xxx/api/v2/help_center/community_posts/search?query=&per_page=1' from origin 'xxxx' 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.


Greg29
  • December 28, 2023

Hi there! CORS errors are only going to be present in a web browser, so you'll never see that in Postman. I would recommend reading this article to learn more about making API requests to another domain within a browser. This is also a good resource for troubleshooting CORS errors. Hope that helps!