Good day. Im trying to change my channel title by using this code:
jsontext = JSON.stringify(['channel', {'status': 'MY TITLE'}]);
$.ajax({
url: 'https://api.twitch.tv/kraken/channels/mychannel',
type: 'PUT',
headers: {
Accept: "application/vnd.twitchtv.v2+json",
Authorization: "OAuth "+token
},
dataType: "json",
contentType: "application/json",
data: jsontext,
success: function(data) {
console.log(data.status);
}
});
but nothing changes and here what console tells me:
No 'Access-Control-Allow-Origin' header is present on the requested resource.
However when i use Chrome app named POSTMAN to test my url it works perfectly.
Did I forget something in my code?