Thanks, The API is accepting the Post with status code 204 (undefined). But the listening client user’s aren’t getting a message.
I’m using these for my JWT:
(edit: userId below is decodedToken.opaque_user_id)
(edit 2: find working code below)
{
...
"role": "external",
"channel_id": "whisper-" + userId,
"pubsub_perms": { "send":[ "whisper-*" ] }
};
And in the body:
{
....
"targets": [ "whisper-" + userId]
}
Posting to:
'https://api.twitch.tv/extensions/message/whisper-'+ userId
And the client listening like this:
window.Twitch.ext.onAuthorized(function(auth) {
...
window.Twitch.ext.listen("whisper-" + auth.userId, function(target, contentType, message){
console.log("Hello World");
});
});
Any help getting this to work would be appreciated.