4 ms·
Hi Zackattack, It's bi-directional... ie, cookie state for the conversation. But in the quickstart, if you think about it... you only increment the counter on
by jeffiel 17y ago
Hi Zackattack,
It's bi-directional... ie, cookie state for the conversation. But in the quickstart, if you think about it... you only increment the counter once for the received message and the reply that the script is going to send, so the counter works out correctly. You had us thinking for a few minutes there :)
-jeff
@twilio
- zackattack 17y agoCool, thanks for getting back to me so quickly. To clarify, the API/platform supports the following two scenarios: 1) You make an HTTP POST to the SMS resource 2) Twilio automatically sends out a text message, and simultaneously does a GET/POST of your script, and $_REQUEST contains "From", "To", and "Body" keys AND 1) Your Twilio phone # receives a text message 2) Twilio automatically pings your script, and inside the ping, $_REQUEST contains "From", "To", and "Body" keys. The value of the "To" key is always your Twilio phone number. (Unless you have multiple Twilio #s, I suppose).
- jeffiel 17y agoTwilio only hits your URL when somebody sends an SMS to your phone number. So in the #1 scenario, if you sent a message via the REST API, Twilio wouldn't hit your URL. If the person replied, then your URL would be hit.