If Spotify has an API the best place to check would be with Spotify, not here as Twitch can’t provide documentation or support for something that has nothing to do with them.
I’m writing here because many bots have this feature. Maybe you are using it in your own chatbot or investigating. I searched the internet before writing here and then decided to open up a topic.
You have to use the spotify API, and setup an auth to generate a token, and setup a refresh of the token. The tokens have a very short life span… an hour or something.
I get the song with the request from the site. But when I add the !song command in the form of writing the error part. Do you have any suggestions about this?
// Don't reply to messages from self or without the "!" as the first char
if (self || message[0] !== '!') {
return;
}
// Run the !song command
// Output items
Console.log("Çalan Şarkı : ",json);
}, function(err) {
console.log('Şuan Şarkı çalmıyor..', err);
});
I have no idea where you are trying to run this, but the API works just fine. Check your chatbot documentation or the API-sites documentation on how to add it.