Threads
Ezra3Scripts1 year ago

I would like to know how to submit a run through the API with plain Javascript though the web browser's console. When I use: "fetch("https://www.speedrun.com/api/v1/runs", { method: "POST" , headers: {"X-API-Key":"NotARealKey1234"}});" I immediately get the error: "Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.speedrun.com/api/v1/runs. (Reason: header ‘x-api-key’ is not allowed according to header ‘Access-Control-Allow-Headers’ from CORS preflight response)." However, when I exclude the header: "fetch("https://www.speedrun.com/api/v1/runs", { method: "POST" });" I get the 403 forbidden response for not including user context. So, how am I supposed to give the user context?

About Ezra3Scripts
Joined
1 year ago
Online
1 year ago
Runs
0