Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

API Help! CORS: No 'access-control-allow-origin' header is present​

A topic by Sparsha created Jan 12, 2021 Views: 951 Replies: 2
Viewing posts 1 to 3

Hi, I want to make a simple customized HTML Sign In page with only one Email Input and a Button and check if the user has actually purchased my app using data from this link: https://itch.io/api/1/KEY/game/CODE/purchases?email=EMAIL_ADDRESS_INPUT

Is it possible to get the data using an XMLhttp request?

I am currently getting the following error:

CORS: No 'access-control-allow-origin' header is present

Does itch provide some way to allow Fetch the data from my domain?

Thanks :)

Admin(+1)

This API is designed for server side access only, because you need to keep your API key private and not publish it. For that reason we do not add the cors headers necessary to enable browser side requests.

Hope that helps!

I see yeah, thats a necessary precaution then. Thanks.
Is it possible for a new feature- something like this to check purchases with ajax requests?

Admin moved this topic to Questions & Support