mirror of
https://github.com/narkoz/hacker-scripts
synced 2025-08-24 11:27:12 +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:
parent
4e5c853c0d
commit
db38986e64
@ -29,7 +29,7 @@ MESSAGE="Late at work. "$RANDOM_REASON
|
|||||||
# Send a text message
|
# Send a text message
|
||||||
RESPONSE=`curl -fSs -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" \
|
RESPONSE=`curl -fSs -u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN" \
|
||||||
-d "From=$MY_NUMBER" -d "To=$HER_NUMBER" -d "Body=$MESSAGE" \
|
-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
|
# Log errors
|
||||||
if [ $? -gt 0 ]; then
|
if [ $? -gt 0 ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user