Hacker News new | past | comments | ask | show | jobs | submit login

One issue with carrier email-to-sms gateways is that they truncate messages at a relatively short number of characters.

Twilio SMS API, on the other hand, does not have that limit and you can send long SMS messages with a single 'curl' command:

  /usr/local/bin/curl -s -X POST -d "Body=$msg" -d "From=$from" -d "To=$to" "https://api.twilio.com/2010-04-01/Accounts/$accountsid/Messages" -u "$accountsid:$authtoken"
That's simplified - I actually pipeline through 'tidy5' and 'source-highlight' to make the output pleasing:

  /usr/local/bin/curl -s -X POST -d "Body=$msg" -d "From=$from" -d "To=$to" "https://api.twilio.com/2010-04-01/Accounts/$accountsid/Messages" -u "$accountsid:$authtoken" | tidy5 -xml -iq | source-highlight -s xml -f esc | awk 'xor(/TwilioResponse/,/Message/,/To/,/From/,/Body/,/Status/,/ErrorCode/,/ErrorMessage/)' | grep -v "/2010-04-01/Accounts/"



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: