TrackerNetwork / TRN.Developers

Information and Issue Tracker for the Tracker Network API.
https://tracker.gg/developers
24 stars 5 forks source link

Cross-Origin Issue #44

Closed margyrop closed 3 years ago

margyrop commented 3 years ago

When I attempt to make a fetch request I get a CORS error.

My request:

fetch(`https://public-api.tracker.gg/v2/apex/standard/profile/${platform}/${user}`, { mode: 'cors', headers: new Headers({ 'Content-Type': 'application/json', 'X-TRN-Api-Key': 'key-here', 'accept': 'application/json' }) })

Using no-cors limits to simple requests to that is not an option.

How do I access the API?

sgtfrankieboy commented 3 years ago

We don't support calling the API from the web. You will have to use an intermediate server to make the API calls.