TWIMSG(1)

πŸ“¦ version 1.2.2, in opensuse-leap 16.0

okay so bestie, this is twimsg(1) from the General Commands Manual β€” the little CLI that sends one outgoing SMS through the Twilio REST API. it's giving tiny-but-mighty, and we're gonna walk through every flag like the group chat depends on it πŸ’–

πŸŽ€ NAME πŸŽ€

twimsg β€” send outgoing SMS message via the Twilio REST API

✨ SYNOPSIS ✨

twimsg [-c config-file] [-C curl-flag] [-e encoding] [-F from-number]
       [-f file] [-m URL] [-t limit] [-u account-sid] [-p auth-token]
       [-P] [-S] [-v] dest-number

πŸ’… DESCRIPTION πŸ’…

twimsg attempts to transmit a single outgoing SMS message using the Twilio REST API to the specified number. the message content comes from standard input, or from the file you name with -f. simple as that, no cap.

phone numbers have to be in E.164 format, i.e. with a leading plus sign followed by the country code, or else as a 5 or 6 digit short code. as a special case, valid North American (NANP) phone numbers may omit the leading +1 and contain extra characters. iconic little exception, honestly.

your input gets automatically truncated at the point where it would exceed limit encoded bytes (default 3200). so yes, it will happily cut you off before things get too long 🌸

🌸 OPTIONS 🌸

  • -c β€” specify the configuration file. this file is simply a shell script that when sourced must define the ACCOUNT_SID and AUTH_TOKEN shell variables containing the corresponding Twilio credentials. it must also define the FROM_NUMBER shell variable if the -F flag is not used to specify the sending SMS phone number. if -c is not specified, /etc/twilio.conf is assumed.
  • -C β€” pass curlflag to curl(1).
  • -e β€” specify input character encoding. the default is UTF-8. invalid character data is silently discarded.
  • -F β€” specify the sending SMS phone number. this flag is required if the configuration file does not define a default FROM_NUMBER.
  • -f β€” read the message content from the specified file instead of standard input.
  • -m β€” send an MMS message using the image found at the specified URL. this flag may be repeated to send multiple images.
  • -p β€” specify authentication token, overriding AUTH_TOKEN from the configuration file, if any.
  • -P β€” read authentication token from the terminal.
  • -t β€” truncate the message when it would exceed limit bytes. because Twilio supports automatic outgoing message concatenation, the default for limit is 3200. however, not all carriers support message concatenation. specify a value of -t 140 to ensure the message fits within a single SMS message chunk.
  • -S β€” if successful, print the SMS message ID, which has the form SM0123456789abcdef0123456789abcdef, to standard output.
  • -u β€” specify Account SID, overriding ACCOUNT_SID from the configuration file, if any.
  • -v β€” verbose mode. shows more information about what's happening.

πŸ”₯ EXIT STATUS πŸ”₯

twimsg exits zero normally, or 1 if an error occurs.

errors returned from the Twilio REST API are reported to standard error. so if Twilio is being dramatic, you'll see it there 🫢

πŸ’€ BUGS πŸ’€

the Twilio API is unable to communicate with other short codes, whether managed by Twilio or not. literally not a vibe, but there it is.

πŸ¦‹ SEE ALSO πŸ¦‹

curl(1), smslen(1), twils(1), twirm(1), twiping(1), twilog(1).

πŸ‘‘ AUTHOR πŸ‘‘

Archie L. Cobbs, archie.cobbs@gmail.com


xoxo, Debian edition Β· Oct 2, 2019 πŸ’–βœ¨

πŸ“¦ where this page comes from