Send a text message from Photon using Twilio

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

  1. Twilio account configured, phone number working with text messages

  2. Include the Twilio library in dashboard

  3. 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
    }

  4. 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 !

hello…any idea please ? :frowning:

Since the topic is resolved in the following (duplicate) one, this one is closed to prevent confusion:

1 Like