From anonymous, 1 Year ago, written in Bash.
This paste is a reply to Untitled from anonymous
- go back
Embed
Viewing differences between Untitled and Re: Untitled
#!/bin/bash

#!/bin/bash

account="..."
"
token="..."
"
from='...'
to="$1"
maxlength=121
shift

data="$*"
'
to="$1"
maxlength=121
shift

data="$*"
(( ${#data} > $maxlength )) && data="${data:0:((maxlength-3))}..."

"

curl -X POST "https://api.twilio.com/2010-04-01/Accounts/$account/SMS/Messages.json" \
     
\
     
--data-urlencode "From=$from" \
     
\
     
--data-urlencode "To=$to" \
     
\
     
--data-urlencode "Body=$data" \
     
\
     
-u "$account:$token" &> /dev/null
/dev/null

Replies to Re: Untitled rss

Title Name Language When
Re: Re: Untitled anonymous bash 1 Year ago.