Forem Creators and Builders 🌱


Posted on • Updated on

API: cors error

Hey all,
I'm trying to build an online markdown editor that can publish to multiple platforms at once (, hashnode, maybe medium etc). I found the documentation page and have created an api key for my profile to test this out, but when I send the request to create an article, this is the result I get back the following error message:

Access to fetch at '' from origin '' has been blocked by CORS policy: Request header field api-key is not allowed by Access-Control-Allow-Headers in preflight response.
Enter fullscreen mode Exit fullscreen mode

Anyone ever had to deal with this ? Any help would be appreciated :)

Edit: turns out you can only access endpoints requiring an API key from a server; moving the execution over there from my frontend code solved my issue. Thanks Michael!

Top comments (0)