spotify-web-api-node
spotify-web-api-node copied to clipboard
ECONNREFUSED
I keep getting this error, ECONNREFUSED, no matter which computer / developer client/secret ids. Is my developer account blocked for making too many requests or something? Or my IP?
I'm running this modified code taken from the examples: https://github.com/thelinmichael/spotify-web-api-node/blob/master/examples/access-token-refresh.js
async function init() {
var responseVal
console.log('init()')
const spotifyApi = new SpotifyWebApi({
clientId: '464xxxxxxxxxxxxxx11',
clientSecret: '97xxxxxxxxxxxxxxxxxcf94'
});
// Retrieve an access token
spotifyApi.clientCredentialsGrant().then(
function (data) {
console.log('The access token expires in ' + data.body['expires_in']);
console.log('The access token is ' + data.body['access_token']);
// Save the access token so that it's used in future calls
spotifyApi.setAccessToken(data.body['access_token']);
},
function (err) {
console.log(
'Something went wrong when retrieving an access token',
err.message
);
}
);
But it fails with this error which includes an IP:
init()
Something went wrong when retrieving an access token connect ECONNREFUSED 35.xxx.xxx.x:443