You did the the extension secret and not the extension client secret
The bottom one:
For ease of testing lets also change
const sigChatPayload = {
exp: Math.floor(new Date().getTime() / 1000) + 4,
channel_id: "152826156",
role: "external",
};
to
const sigChatPayload = {
exp: Math.floor(new Date().getTime() / 1000) + 4,
user_id: "The ID of the Twitch Account that owns the extension",
role: "external",
};
and the broadcaster_id in the payload is not correct
json: {
broadcaster_id: 152826156,
text: "This is a Test Message Kappa",
extension_id: client_id,
extension_version: "0.0.1",
},
should be a string
json: {
broadcaster_id: "152826156",
text: "This is a Test Message Kappa",
extension_id: client_id,
extension_version: "0.0.1",
},
Also check the version numbers match. That 0.0.1 is active on the destination channel
