Question

API CORS Error

  • 19 June 2023
  • 3 replies
  • 56 views

Hi,

I’m trying to make asynchronous calls to the Guru API via Javascript but I receive CORS errors. When I call the API from a server side request, it is fine, but trying to call the API via client side does not work.

What am I missing in order to get it to work?

Thanks!


3 replies

Userlevel 4
Badge

Hi @Tom S! CORS errors are pushed out by the browser. Guru prevents other webpages from being able to call our API for cybersecurity reasons. Guru expects that our webapp and extension are the only UIs that’ll use our API. To proceed, you’ll need to setup a server to make the Guru API call and make calls from the browser to your server. Guru also offers a Zapier app and Workato app. Both of these apps are a low-code/no-code alternative. If you can explain a little more around what you are trying to achieve, we can see if anyone in the Community has experience building something similar.

Hi @Marie Frei ,

Thanks for your reply! We are looking to have the ability to display a list of collections and their subsequent folders/cards in the front-end of a website using asynchronous API calls. We are only looking to read the data so there is no potential security issue and access to the web page where this functionality would live is behind our SSO login.

Thanks

Userlevel 4
Badge

Hi @Tom S, I see, thank you for this feedback. If you’re seeing a CORS error, you’ll need to try an alternative method. Understanding that you’re interested in making content in Guru appear elsewhere, does this information on publishing Guru content to a Third Party help?

Reply