Need help getting SMS from Twilio

I set up a Twilio acount and webhook setup on the Partical sight and ran this code and did not get a text. what am I doing wrong?

The end result is I want to get a text when a float switch gets activated.

/* 
Basic example of sending a SMS with Twilio and a Particle Photon.

Author: Paul Kamp, Twilio Developer Education
License: MIT
*/

String body = "Hey, this is your Particle Photon!";

void setup() {
  Particle.publish("twilio_sms", body, PRIVATE);
  Serial.begin(115200);
}

void loop() {
    Serial.println("That's all!  You can restart or edit the code now.");
    delay(60000);
}

Impossible to know without more information. How did you set up your webhook? Are you using the Twilio API correctly? The Twilio side of things is best handled on their forums.

This is how I set it up for the web hook. I will also post to the Twilio fourm.

Thanks,
Doug H.


#### Event Name The Particle event name that triggers the webhook

twilio_sms

#### Full URL

The target endpoint that is hit when the webhook is triggered

[https://api.twilio.com/2010-04-01/Accounts/{{AC75b94829be47452dff0d19b1ffd3xxxx}}](https://api.twilio.com/2010-04-01/Accounts/%7B%7BAC75b94829be47452dff0d19b1ffd3b2c1%7xxxx)

#### Request Type

The standard web request method used when the webhook is triggered

POST

#### Request Format

How the webhook data will be encoded and passed to the target endpoint

Web Form

#### Device

The device that will trigger the webhook

Watertable

#### Form

Form data that will be sent along with the webhook

{
“To”: “+1207322xxxx”,
“From”: “+1202937xxxx”,
“Body”: “{{PARTICLE_EVENT_VALUE}}”
}


#### Auth

HTTP Basic Auth username and password for webhook authentication

{
“username”: “AC75b94829be47452dff0d19b1ffd3xxxx”,
“password”: “3a3c2e9124c810c24031af95665cxxxx”
}


#### Headers

HTTP Headers to include when hitting the webhook endpoint

{
“Content-Type”: “application/x-www-form-urlencoded”
}


#### Enforce SSL

Whether your webhook will will validate the certificate against its certificate authority chain

Yes

#### EXAMPLE DEVICE FIRMWARE

Can you check the console logs to see if there is a problem with the webhook?
Here:
https://console.particle.io/logs

Thanks

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.