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