Request example NODEJS

anyone can share him start code nodejs for the new twitch api ?
im beginner and i want to try to dev my own bot, thanks

You jsut need to pick a library that makes cURL requests and away you go.

If using Got, (incomplete sample)

        headers: {
            'Content-Type': 'application/json',
            'Client-ID': client_id
        gzip: true
.then(resp => {

Got is documented here

1 Like

can i update my old code ?“GET”, “” + config.twitchToken, true);

I’ve never used XHR in a nodeJS server application so yes?

Give you are using kraken

You can either

Upgrade from v3 to v5

Or go to Helix.

For XHR you can refer to this post

Where we covered how to XHR

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.