I can now send a pubsub message for an extension but am getting a 204 error (no content), where is the content supposed to go?? I’m using the example given and am getting the error.
var dataToSend = {"content_type":"application/json", "message":"{\"foo\":\"bar\"}", "targets":["broadcast"]};
//dataToSend = JSON.stringify(dataToSend);
$.ajax({
url: 'https://api.twitch.tv/extensions/message/178080165',
headers: {
'Authorization':'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1ODkzNDg5NDcsInVzZXJfaWQiOiIxNzgwODAxNjUiLCJyb2xlIjoiZXh0ZXJuYWwiLCJjaGFubmVsX2lkIjoiMTc4MDgwMTY1IiwicHVic3ViX3Blcm1zIjp7InNlbmQiOlsiKiJdfX0.GTUWnBKwtei6-j2OYh6R8Fj59m8bDkUmWbxQVTeDs4Y',
'Client-Id':'g39equtxkqd9z7s9qvj6cshka1jgu8'
},
method: 'POST',
contentType: "application/json; charset=utf-8",
dataType: "json",
data: dataToSend,
success: function(data){
console.log(data);
}
});
This is what I’m using.