htilly / zenmusic

Slack / Sonos / Spotify / Node.js - Control Sonos through #Slack
125 stars 36 forks source link

Spotify Auth Token (I think) #34

Closed dougmitchell closed 6 years ago

dougmitchell commented 6 years ago

I believe I have the Spotify access token entered correctly. I have base64 encoded the : then added this to the apiKey field within config.json.

However, I receive this error when I attempt a search or other command which triggers Spotify calls

`/opt/zenmusic/node_modules/urllib-sync/index.js:40 throw res.error; ^

Error: spawnSync /usr/local/bin/node ETIMEDOUT at exports._errnoException (util.js:1007:11) at Object.spawnSync (child_process.js:464:20) at Object.request (/opt/zenmusic/node_modules/urllib-sync/index.js:33:16) at _getAccessToken (/opt/zenmusic/index.js:1365:31) at _searchSpotify (/opt/zenmusic/index.js:1070:23) at _search (/opt/zenmusic/index.js:852:16) at RTMClient.slack.on (/opt/zenmusic/index.js:175:13) at RTMClient.emit (/opt/zenmusic/node_modules/@slack/client/node_modules/eventemitter3/index.js:116:35) at RTMClient._handleWsMessageViaEventHandler (/opt/zenmusic/node_modules/@slack/client/lib/clients/rtm/client.js:482:10) at RTMClient.handleWsMessage (/opt/zenmusic/node_modules/@slack/client/lib/clients/rtm/client.js:436:10) at WebSocket.wrapper (/opt/zenmusic/node_modules/@slack/client/node_modules/lodash/lodash.js:4941:19) at emitTwo (events.js:106:13) at WebSocket.emit (events.js:191:7) at Receiver.ontext (/opt/zenmusic/node_modules/@slack/client/node_modules/ws/lib/WebSocket.js:841:10) at /opt/zenmusic/node_modules/@slack/client/node_modules/ws/lib/Receiver.js:536:18 at Receiver.applyExtensions (/opt/zenmusic/node_modules/@slack/client/node_modules/ws/lib/Receiver.js:371:5)`

htilly commented 6 years ago

Hi! Strange. Have you set the "market" in the config to the same country as the Spotify account is registered ?

BR Tilly

htilly commented 6 years ago

Did you get it to work ?

/Tilly

dougmitchell commented 6 years ago

Thank you for reaching out, sorry for my delay. I do have the Market set to "US" within config.json

I have some co-workers who created a similar integration last year. I'll reach out to them for help (can you tell I'm not a developer). For now if you prefer to close this I am fine with it.

htilly commented 6 years ago

Ok. Hope U get it running!