I'm attempting to change the stream title using the Twitch API and I'm getting a 404 error. I referred to the docs here and followed its example but no luck.
var axios = require('axios');
headers = {
'Authorization':'Bearer [token]',
'Client-Id':'[client id]',
'Content-Type':'application/json'
}
data = {
'title':'changed title'
}
axios.post('https://api.twitch.tv/helix/channels?broadcaster_id=[broadcaster id]', data, {'headers':headers}).then(resp => {
console.log(resp.data);
}).catch(err => console.error(err))