Videos enpoint returns empty data array for game_id

Fix: set a “bad” accept-language header

let url = 'https://api.twitch.tv/helix/videos?game_id=32399';

let r = await fetch(
    url,
    {
        method: 'GET',
        headers: {
            'Client-ID': `${client_id}`,
            'Authorization': `Bearer ${token}`,
            'Accept': 'application/json',
            'accept-language': 'YOUWHAT'
        }
    }
);
let p = await r.json();

console.log(p);

Why this works? I have no idea.

1 Like