Spotify Dashboard Widget
Here is a simple, but fairly complete example of a spotify widget for NodeRed
[{"id":"b8ecdb87.30751","type":"tab","label":"Spotify","disabled":false,"info":""},{"id":"b76ecf04.fa7db","type":"spotify","z":"b8ecdb87.30751","name":"Get Track","auth":"efc26091.631ed8","api":"getMyCurrentPlayingTrack","x":320,"y":160,"wires":[["c54982b2.2c241"]]},{"id":"fb7dce5a.6092b","type":"inject","z":"b8ecdb87.30751","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"5","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":160,"wires":[["b76ecf04.fa7db"]]},{"id":"c54982b2.2c241","type":"template","z":"b8ecdb87.30751","name":"","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{\n \"id\": \"{{payload.item.id}}\",\n \"artist\": \"{{payload.item.artists.0.name}}\",\n \"track\": \"{{payload.item.name}}\",\n \"art_URL\": \"{{{payload.item.album.images.1.url}}}\"\n}","output":"str","x":480,"y":160,"wires":[["3dd80220.0eb7b6"]]},{"id":"9ff42980.cc6fa","type":"ui_template","z":"b8ecdb87.30751","group":"6a8a4ce5.eb40bc","name":"","order":1,"width":"6","height":"7","format":"<b><h3>{{msg.payload.track}}</h3></b>\n{{msg.payload.artist}}\n<br>\n<img src={{msg.payload.art_URL}}>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":800,"y":120,"wires":[[]]},{"id":"3dd80220.0eb7b6","type":"json","z":"b8ecdb87.30751","name":"","property":"payload","action":"","pretty":false,"x":610,"y":160,"wires":[["9ff42980.cc6fa","a6650540.40fff8","ef6de29e.32c1a8"]]},{"id":"b3f0f318.c1997","type":"ui_button","z":"b8ecdb87.30751","name":"Like","group":"6a8a4ce5.eb40bc","order":7,"width":"6","height":"2","passthru":false,"label":"","tooltip":"","color":"","bgcolor":"","icon":"favorite","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":130,"y":260,"wires":[["d73a53e7.856ed"]]},{"id":"a6650540.40fff8","type":"mqtt out","z":"b8ecdb87.30751","name":"","topic":"spotify/currentTrack","qos":"","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"a739201b.83e56","x":830,"y":160,"wires":[]},{"id":"f8f048b4.509348","type":"spotify","z":"b8ecdb87.30751","name":"","auth":"efc26091.631ed8","api":"addToMySavedTracks","x":480,"y":260,"wires":[["e46959ea.17efd8"]]},{"id":"d73a53e7.856ed","type":"function","z":"b8ecdb87.30751","name":"","func":"var track = flow.get(\"id\");\n\nmsg.params = [\n [track]\n];\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":280,"y":260,"wires":[["f8f048b4.509348"]]},{"id":"ff5cd93e.b26878","type":"ui_button","z":"b8ecdb87.30751","name":"Pause","group":"6a8a4ce5.eb40bc","order":3,"width":"2","height":"1","passthru":false,"label":"","tooltip":"","color":"","bgcolor":"","icon":"pause","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":130,"y":300,"wires":[["c8229433.ef1e28"]]},{"id":"c8229433.ef1e28","type":"spotify","z":"b8ecdb87.30751","name":"","auth":"efc26091.631ed8","api":"pause","x":270,"y":300,"wires":[[]]},{"id":"a63d7808.6c7098","type":"ui_button","z":"b8ecdb87.30751","name":"Play","group":"6a8a4ce5.eb40bc","order":2,"width":"2","height":"1","passthru":false,"label":"","tooltip":"","color":"","bgcolor":"","icon":"play_arrow","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":130,"y":340,"wires":[["dfb45e3f.96e288"]]},{"id":"dfb45e3f.96e288","type":"spotify","z":"b8ecdb87.30751","name":"","auth":"efc26091.631ed8","api":"play","x":270,"y":340,"wires":[[]]},{"id":"18472670.b57a7a","type":"ui_button","z":"b8ecdb87.30751","name":"Previous","group":"6a8a4ce5.eb40bc","order":4,"width":"1","height":"1","passthru":false,"label":"","tooltip":"","color":"","bgcolor":"","icon":"fast_rewind","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":120,"y":380,"wires":[["d91e7af0.80e808"]]},{"id":"d91e7af0.80e808","type":"spotify","z":"b8ecdb87.30751","name":"","auth":"efc26091.631ed8","api":"skipToPrevious","x":300,"y":380,"wires":[[]]},{"id":"dd7df327.4ff0e","type":"ui_button","z":"b8ecdb87.30751","name":"Next","group":"6a8a4ce5.eb40bc","order":5,"width":"1","height":"1","passthru":false,"label":"","tooltip":"","color":"","bgcolor":"","icon":"fast_forward","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":130,"y":420,"wires":[["b6c2a702.5dd63"]]},{"id":"b6c2a702.5dd63","type":"spotify","z":"b8ecdb87.30751","name":"","auth":"efc26091.631ed8","api":"skipToNext","x":290,"y":420,"wires":[[]]},{"id":"ef6de29e.32c1a8","type":"change","z":"b8ecdb87.30751","name":"track","rules":[{"t":"set","p":"id","pt":"flow","to":"payload.id","tot":"msg"},{"t":"set","p":"track","pt":"flow","to":"payload.track","tot":"msg"},{"t":"set","p":"artist","pt":"flow","to":"payload.artist","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":200,"wires":[[]]},{"id":"e46959ea.17efd8","type":"template","z":"b8ecdb87.30751","name":"Notification","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Track {{flow.track}} by {{flow.artist}}\nadded.","output":"str","x":670,"y":260,"wires":[["a257db26.c59b48"]]},{"id":"a257db26.c59b48","type":"ui_toast","z":"b8ecdb87.30751","position":"top right","displayTime":"3","highlight":"","sendall":true,"outputs":0,"ok":"OK","cancel":"","raw":false,"topic":"","name":"","x":840,"y":260,"wires":[]},{"id":"efc26091.631ed8","type":"spotify-auth","name":"Spotify OAuth2","scope":"user-read-playback-state user-modify-playback-state user-read-currently-playing app-remote-control streaming playlist-modify-public playlist-modify-private playlist-read-private user-library-modify user-library-read"},{"id":"6a8a4ce5.eb40bc","type":"ui_group","name":"Spotify","tab":"f97cb2ec.c9379","order":4,"disp":true,"width":"6","collapse":false},{"id":"a739201b.83e56","type":"mqtt-broker","name":"","broker":"message1.reality.dataforge.network","port":"1883","clientid":"","usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""},{"id":"f97cb2ec.c9379","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]