crispymtn / crispyfi

Makes music. Loud. https://www.crispymtn.com/stories/let-the-music-play
125 stars 17 forks source link

API not found #3

Closed leventyalcin closed 9 years ago

leventyalcin commented 9 years ago

Hi,

I've installed crispyfi on Raspberry and there was two issues I saw. One of them Error: libspotify.so.12: cannot open shared object file: No such file or directory and I resolved that issue as like explained in here https://github.com/FrontierPsychiatrist/node-spotify/issues/43#issuecomment-38305403

The other one is {"success":false,"reason":"/ api not found"} but couldn't understand what is wrong with it. I see Logged in message in terminal btw,

$ node index
Loading Plugins...
...done.
Server running. Yay!
Logged in
dkoch commented 9 years ago

Hey there,

it seems you're posting your commands to http://<your server>/. Try adding handle to the end so your endpoint looks like http://<your server>/handle. That should fix your problem.

leventyalcin commented 9 years ago

I tried but just changes error message :) {"success":false,"reason":"/handle api not found"}

dkoch commented 9 years ago

Hm, that's weird. Are you using GET or POST requests? It's meant to be used with POST, but GET should work as well. (I just set up a fresh installation on my machine and got it up and running with both verbs).

Also, are you using the Slack integration, or are you issuing commands another way?

adampluck commented 9 years ago

Just going to http://localhost:8000 (and /handle) but get the message {"success":false,"reason":"/handle api not found"}

A slack POST webhook has been set up:

When a message starts with play, pause, stop, skip, shuffle, list, vol, status, help, reconnect, POST to http://192.168.1.87:8000 http://192.168.1.87:8000/handle http://192.168.1.87/handle http://192.168.1.87:8000/handle/ http://192.168.1.87/handle/ (added several variations just in case)

Added multiple local IPs. But is there a proper way to test locally? Just a GET request locally? As levent said above, server is running fine :)

Thanks btw! Adam

adampluck commented 9 years ago

All sorted. Used ngrok like you recommended.

Opened ngrok 8000, then added this to Slack http://abc123.ngrok.com/handle

Thanks!