Hello everyone. I’m having trouble updating my Twitch stream title using jQuery AJAX. The weird thing is that my code seems to work but the title doesn’t actually change.
Here’s what I’m using:
var newTitle = "Streaming awesome gameplay today!";
$.ajax({
url: 'https://api.twitch.tv/kraken/channels/mystream?channel[status]=' + newTitle + '&oauth_token=' + authToken,
method: 'PUT',
dataType: 'jsonp',
contentType: 'application/json',
success: function(response) {
console.log(response.status);
}
});
The strange part is that I get a success response with the current title, but when I check my channel the title remains unchanged. When I test the exact same URL using Postman it works perfectly and updates the title right away.
Anyone know why this might be happening with jQuery but not with Postman? I’m stumped.