Everything goes through as expected, and I don’t seem to be running into issues with the request going through. Just that I’m getting a 400 error when doing so.
I have the request itself look like this:
const s = await this.#data_base.getIdAndSecret();
const data = {
'method': 'PUT',
'headers': {
'client-id': `${s[0]}`,
'Authorization': `Bearer ${await this.#data_base.getTwitchInfo(0)}`,
'Content-Type': 'application/json'
},
'body': {
'tag_ids': tags_array
}
};
where the data_base object is my secured SQLite database and the tags array is the list of tags I want to apply to the stream. To send out the request, I’m using the node-fetch library.
I’m making the call to this specific URL:
https://api.twitch.tv/helix/streams/tags?broadcaster_id=**********
where the stars represent my own broadcaster id.
I’m not certain why I’m getting this issue, as I didn’t think I was doing anything wrong. The bot is an editor to my channel, and all other API requests go through as normal. Just that this one doesn’t for some reason.
Any help would be appreciated, and I apologize if this is something that was already asked and answered.