Scroll to navigation

TWIMSG(1) General Commands Manual TWIMSG(1)

NAME

twimsgSend 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] [-vdest-number

DESCRIPTION

twimsg attempts to transmit a single outoing SMS message using the Twilio REST API to the specified number. The message content is read from standard input, or the specified file if the -f flag is used.

Phone numbers must be specified in E.164 format, i.e., with a leading plus sign and 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.

The input is automatically truncated at the point at which it would exceed limit encoded bytes (default 3200).

OPTIONS

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. This file must also define FROM_NUMBER shell variable if the -F flag is not used to specify the sending SMS phone number.

If the -c flag is not specified, /etc/twilio.conf is assumed.

Pass curlflag to curl(1).
Specify input character encoding. The default is UTF-8.

Invalid character data is silently discarded.

Specify the sending SMS phone number. This flag is required if the configuration file does not define a default FROM_NUMBER.
Read the message content from the specified file instead of standard input.
Send an MMS message using the image found at the specified URL. This flag may be repeated to send multiple images.
Specify authentication token, overriding AUTH_TOKEN from the configuration file, if any.
Read authentication token from the terminal.
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.

If successful, print the SMS message ID, which has the form SM0123456789abcdef0123456789abcdef, to standard output.
Specify Account SID, overriding ACCOUNT_SID from the configuration file, if any.
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.

BUGS

The Twilio API is unable to communicate with other short codes, whether managed by Twilio or not.

SEE ALSO

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

AUTHOR

Archie L. Cobbs ⟨archie.cobbs@gmail.com⟩

October 2, 2019 Linux 6.4.0-150600.23.25-default