Hi all
I’m ttly lost concerning procedures and explanations on Twilio.
It exists a Twilio library, but first this lib on GitHub still uses old spark-cli. So here what I done
-
Twilio account configured, phone number working with text messages
-
Include the Twilio library in dashboard
-
Created the webhook using the command
particle webhook create twilio.json
twilio.json is the following (inspired from Hoxworth post Webhooks + Sending a text message){
“eventName”: “twilio”,
“url”: “https://api.twilio.com/2010-04-01/Accounts/xxxxxx/Messages”,
“requestType”: “POST”,
“auth”: {
“username”: “xxxxxx”,
“password”: “xxxxxx”
},
“form”: {
“From” : “+xxxxxx”,
“To” : “+xxxxxx”,
“Body” : “mouvement detecte”,
“MediaUrl” : “https://dl.dropboxusercontent.com/u/10931735/big_spark-mark-400px.png”
},
“mydevices”: true
} -
But after to compile it, what command I need to enter ?? the old spark command is not compatible and fails of course. the command to use is
particle compile photon <and_what_??>
PS : to compile and flash it, I suppose I need to do it on the laptop where my Photon is connected. So the Twilio library added in https://build.particle.io/build is used for what ???
I really need your help, since I tried lot of things and don’t succeeded to make it work. THANKS a lot for your feedback !