Gemäß this issue müssen Sie ein Zugriffs-Token setzen.
spotifyApi.setAccessToken('myAccessToken');
Werfen Sie auch einen Blick hier: https://github.com/thelinmichael/spotify-web-api-node#setting-credentials
// Set necessary parts of the credentials on the constructor
var spotifyApi = new SpotifyWebApi({
clientId : 'myClientId',
clientSecret : 'myClientSecret'
});
// Get an access token and 'save' it using a setter
spotifyApi.clientCredentialsGrant()
.then(function(data) {
console.log('The access token is ' + data.body['access_token']);
spotifyApi.setAccessToken(data.body['access_token']);
}, function(err) {
console.log('Something went wrong!', err);
});
// Get tracks in a playlist
spotifyApi.getPlaylistTracks('thelinmichael', '3ktAYNcRHpazJ9qecm3ptn', { 'offset' : 1, 'limit' : 5, 'fields' : 'items' })
.then(function(data) {
console.log('The playlist contains these tracks', data.body);
}, function(err) {
console.log('Something went wrong!', err);
});
hier einen Blick https://github.com/thelinmichael/spotify-web-api-node/issues/86 – Victor
habe ich bereits regeneriere die Kundennummer und die geheime ID ... –