Wednesday, 7 June 2017

spotify-web-api-node - WebapiError: Unauthorized

var SpotifyWebApi = require('spotify-web-api-node');

var spotifyApi = new SpotifyWebApi({
    clientId : 'xxx',
    clientSecret : 'xxx',
    redirectUri : 'https://example.com/callback'
});

spotifyApi.getTrack('2q8eudK0r9ImgCB1XhFfxG').then(function(data) {
    console.log(data);
});

My code worked but for 1 month I have this error.

(node:12824) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): WebapiError: Unauthorized

(node:12824) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.



via Céline Martin

No comments:

Post a Comment