Spotify.getAccessToken()

Get access token to use with requests to Spotify Web API.

Get access token using your Client ID and Client Secret for use with requests to Spotify Web API.

Usage

Hover over inputs/exits for more info.

var Spotify = require('machinepack-spotify');


// Get access token to use with requests to Spotify Web API.

Spotify.getAccessToken({

clientId: 'abc123jdhs3h4js',

clientSecret: '87kljf66jlf9jj98q89f7s8i',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function () {

 

},

});

Inputs

clientId required

The clientId for your Spotify app. The client ID provided to you by Spotify when you register your application.

'abc123jdhs3h4js'
clientSecret required

Secure key for your Spotify App.

'87kljf66jlf9jj98q89f7s8i'

Exits

error

An unexpected error occurred.

success

OK.