Live_channels is always empty

It looks like the live_channels endpoint always return an empty channels object even though i’m streaming with the extension installed and activated ( i let it run more than 1hour to be sure that my stream would be added as the channels update takes some minutes)

javascript file

function getLiveChannels () {
  return new Promise(resolve => https.get({
    protocol: 'https:',
    hostname: 'api.twitch.tv',
    path: `/extensions/${EXTENSION_ID}/live_channels`,
    headers: {
      'Client-Id': CLIENT_ID
    }
  }, async res => {
    res.setEncoding('utf8')
    let rawData = ''
    res.on('data', chunk => (rawData += chunk))
    res.on('end', _ => resolve(JSON.parse(rawData)))
  }))
}

const interval = async _ => {
  const newChannels = await getLiveChannels()
  console.log(newChannels)
}

interval()
setInterval(interval, 1000 * 30)

always return

{ channels: [] }

Specify an oauth token that belongs to you the owner of the extension, in the header. Don’t know which scopes are needed.

Can confirm it does work when specify an oauth that belongs to the extension owner as I’m using it myself.

If I try without the oauth I get zero channels. An oauth is required.

Someone should update the docs then :confused:

1 Like

Indeed.

I didn’t notice it initially as I use 3v’s chrome extension which has an oauth saved :stuck_out_tongue:

I’ve flagged it upstairs

Note for other people finding this thread.

You do NOT need an oAuth for this end point.
And like streams end point it can be 3/5 minutes delayed in showing data