spotify-oauth2

1.0.3 • Public • Published

spotify-oauth2

This is a simple node package to request new Spotify access tokens with your refresh token.

const Refresher = require('spotify-oauth2');
/* Paremeters here are the client id and the client secret */
const refresher = new Refresher('xxx', 'xxx');

/* Replace 'xxx' with your refresh token */
refresher.set('refresh_token', 'xxx');

/* Will return an object of your updated access token. */
refresher.request();

/* There is also an event emitted once the access token is refreshed */
/* This will return the tokens retrived on the refresh */
refresher.on('token', (token) => console.log(token));

Readme

Keywords

Package Sidebar

Install

npm i spotify-oauth2

Weekly Downloads

1

Version

1.0.3

License

Apache-2.0

Unpacked Size

15.5 kB

Total Files

6

Last publish

Collaborators

  • coltzy