2
0
mirror of https://github.com/narkoz/hacker-scripts synced 2025-08-23 19:07:33 +00:00

Use modern Twilio Messaging endpoint

The `/SMS/Messages` endpoint is the old SMS-only endpoint. `/Messages` can send SMS and MMS, but `/SMS` will be deprecated at some point in the (probably far) future. This makes the script more future-proof.
This commit is contained in:
Carlos Diaz-Padron 2015-11-23 10:55:53 -08:00
parent 4e5c853c0d
commit db38986e64

View File

@ -29,7 +29,7 @@ MESSAGE="Late at work. "$RANDOM_REASON
# Send a text message
RESPONSE=`curl -fSs -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" \
-d "From=$MY_NUMBER" -d "To=$HER_NUMBER" -d "Body=$MESSAGE" \
"https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/SMS/Messages"`
"https://api.twilio.com/2010-04-01/Accounts/$TWILIO_ACCOUNT_SID/Messages"`
# Log errors
if [ $? -gt 0 ]; then