node-red-spotify 1.0.0

Node-RED nodes for the Spotify Web API with OAuth (authorization code / PKCE) via a config node

npm install node-red-spotify

node-red-spotify

Node-RED nodes for the Spotify Web API, with the OAuth (Authorization Code + PKCE) flow handled by a configuration node.

Nodes

  • spotify-config – Client ID/Secret, scopes, redirect URI, Authorise button. Stores tokens in <userDir>/spotify-web-api-tokens.json (mode 600), refreshes automatically, retries 429/5xx.
  • spotify-api – ~80 operations (player, search, tracks, albums, artists, playlists, library, user, shows, browse). Parameters come from msg.payload.<param>, msg.<param>, or the node fields. IDs can be IDs, URIs or URLs. Optional "fetch all pages". Operation can be set via msg.operation.
  • spotify-watch – polls the player and emits on track / state change.

Setup

  1. Create an app at https://developer.spotify.com/dashboard.
  2. Install: cd ~/.node-red && npm install /path/to/node-red-spotify and restart.
  3. Add a Spotify node, edit the config, copy the displayed Redirect URI (<editor origin>/spotify-web-api/callback) into the Spotify app's Redirect URIs. Spotify requires HTTPS (or http://127.0.0.1). If Node-RED sits behind a proxy, set the Redirect URI field manually.
  4. Enter Client ID (Secret optional), click Authorise with Spotify, then Done/Deploy.

Notes

  • Playback control needs Spotify Premium and an active device.
  • Spotify removed audio-features/analysis, recommendations, related-artists etc. for new apps (Nov 2024); they return 403 there.
  • Tests: npm test (mocked HTTP).

Node Info

Version: 1.0.0
Updated 3 hours ago
License: MIT
Rating: not yet rated

Categories

Actions

Rate:

Downloads

0 in the last week

Nodes

  • spotify-config
  • spotify-api
  • spotify-watch

Keywords

  • node-red
  • spotify
  • oauth
  • music
  • spotify-web-api

Maintainers