Hello, and thank you for the response. I have been trying to get this to work, and even with simply:
let sub = {
version: "1",
type: "channel.follow",
condition: {
broadcaster_user_id:id
},
transport: {
method: "webhook",
callback: "https://events.hookdeck.com/e/src_mnIcaKuCZVjRaKLupNqFCjOq",
secret: process.env.SUB_SECRET
}
};
fetch ("https://api.twitch.tv/helix/eventsub/subscriptions", {
method:'POST',
headers: {
'Client-ID': process.env.CLIENT_ID,
'Authorization': process.env.TOKEN,
'Content-Type': 'application/json'
},
body:JSON.stringify(sub)
} )
.then(res => res.json())
.then(data => console.log(data));
With id having a valid value. I get the same error.