CORS errors when using the API

I get CORS errors when I try to use the API. How can this be resolved?

Hi @Jerald_Hamilton.

Are you making API requests from a browser (e.g. a website that fetches data from Grist)? We currently limit API usage to non-browsers due to authentication via API key generally being unsuitable for web pages (the API key is sensitive, and would be visible in the page source).

George

@Jerald_Hamilton do you need to read data or also write ?

@georgegevoian maybe opening GET/OPTIONS and allowing to read a table through the API when public access is on can solve some simple scenarios ?

Hi @georgegevoian, I am making api requests from a low-code front-end dev platform called appygver (https://www.appgyver.com) - From what I see, it hides the API key from prying eyes but still expects to connect with a server that supports/allows cors.

Hi Yohan, I am doing both read and write. Thanks

Sorry guys, I’ve decided to use an API proxy. Thanks for the help

1 Like

Hey there :slight_smile:
I want to use the grist API in a webapp, and I know how to keep the apiKey safe - how can I enable CORS access to grist?