1.0.2 • Published 4 years ago
spotify-connector v1.0.2
Spotify Connector
Setup
> npm install spotify-connector
Usage
You just pass the necessary parameters to the object that you created out of the class and call connect()
. That's it.
It's not magic. But here's the more detailed version of the usage:
import SpotifyConnector from "spotify-connector"
const spotifyConnector = new SpotifyConnector({
clientID: "<SPOTIFY_DEV_CLIENT_ID>"
clientSecret: "<SPOTIFY_DEV_CLIENT_SECRET>"
redirectURI: "<SPOTIFY_REDIRECT_URI>"
authorizationScopes: "<[AUTHORIZATION_SCOPES]>" // optional - (default:null)
});
spotifyConnector.connect();
After the redirection you need to parse and get the token from the URL generated by Spotify and use it to make requests you want
For more information:\ https://developer.spotify.com/documentation/general/guides/authorization-guide