Problem with Webflow API

Hello community, I have a script that should send a simple Webflow API GET request to get all collection items. Script is set normally, and submit button works good, but I can not get an access and I don’t know why.

I’m trying to have this API Call on a custom submit button click on my webflow page. And I simply have a “< script src=”…“>< /script >” in the before < /body > tag on my Webflow page.

API key is right, collection ID is right, what should I do else…
I hope someone knows what happens and what to do :frowning:

Thank you in advance!


What you need to do, install this chrome extension and enable this and then test

But since its just an extension - it’ll work for me only, which is weird, I need it for website users.

then please add this in your request header

'Access-Control-Allow-Origin': '*'

Okay, but does Webflow even has this ability to add headers? I don’t think so

Can you confirm that the same request works in the developer docs (by running the “Try it” experience here)?

We do return CORS headers on all the API routes, so my guess is we’re hitting a different issue (eg. invalid route, missing scopes, etc) and the preflight is failing.