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: [] }