TWIPING(1)

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

🌸 NAME 🌸

okay bestie, welcome to twiping(1) πŸ’– β€” the manual page for twiping, which sends an SMS ping via the Twilio REST API. that's the whole vibe. it pings, it waits, it slays. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

twiping [-c config-file] [-C curl-flag] [-F from-number] [-f format]
        [-m reply-pattern] [-t testcode] [-u account-sid]
        [-p auth-token] [-P] [-w timeout] dest-number

πŸ’… DESCRIPTION πŸ’…

so here's the tea β˜• β€” twiping tries to fire off one single outgoing SMS message containing a unique test code to the number you specified. then it just… waits. patiently. like a bestie holding your iced coffee πŸ₯€. it's waiting for an SMS reply that contains that same test code, and it does all of this through the Twilio REST API. periodt. πŸ‘‘

by default, that test message looks like TESTxxxxxxxx β€” where the x characters get replaced by random hex digits. and here's the cute part: only the hex digits (the xxxxxxxx part) are matched in the reply. πŸŽ€ that behavior is fully changeable with the -t and -m flags, iykyk.

phone numbers gotta be in E.164 format β€” that means a leading plus sign + followed by the country code πŸ—ΊοΈ β€” or as a 5 or 6 digit short code. no cap, those are the only two options.


✨ OPTIONS ✨

  • -c β€” specify the configuration file. this file is literally just a shell script that, when sourced, must define the ACCOUNT_SID and AUTH_TOKEN shell variables holding the corresponding Twilio credentials. πŸ”‘ it must also define the FROM_NUMBER shell variable if the -F flag isn't being used to specify the sending SMS phone number. and if you don't pass -c at all? /etc/twilio.conf is assumed, bestie. that's the default. 🌈
  • -C β€” pass flag to curl(1). πŸŒ€
  • -f β€” specify an alternate printf(1) format string; the default is TEST%s. the format string should contain one instance of %s, which gets replaced by the test code. πŸ“
  • -F β€” specify the sending SMS phone number. this flag is required if the configuration file doesn't define a default FROM_NUMBER. πŸ™ˆ
  • -p β€” specify authentication token, overriding AUTH_TOKEN from the configuration file, if any. πŸ”
  • -m β€” match responses using the specified extended regular expression. any occurrences of @TESTCODE@ within reply-pattern get replaced with the test code. 🧚
  • -P β€” read authentication token from the terminal. ⌨️
  • -t β€” don't generate or send a test code. instead, assume the specified testcode has just been sent and expect a reply normally. πŸ‘€
  • -u β€” specify Account SID, overriding ACCOUNT_SID from the configuration file, if any. πŸͺͺ
  • -w β€” wait up to timeout seconds for a reply. the default timeout is 30 seconds. ⏳

πŸŽ€ EXIT STATUS πŸŽ€

  • 0 β€” exits zero when everything's normal, slay πŸ’–
  • 1 β€” an error occurs 😭
  • 2 β€” no response is received within the specified timeout πŸ’€
also important: errors returned from the Twilio REST API are reported to standard error. so like, check stderr before you spiral, okay? 🫢

πŸ› BUGS πŸ›

the Twilio API is unable to communicate with other short codes β€” whether they're managed by Twilio or not. that's just the situation, ngl. πŸ™ƒ


πŸ”₯ SEE ALSO πŸ”₯

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


πŸ‘‘ AUTHOR πŸ‘‘

Archie L. Cobbs <archie.cobbs@gmail.com> β€” the icon who made this happen. 🫑


and that's the whole page, bestie!! πŸ’œ this edition came from Debian, dated Oct 2, 2019, and it's twiping(1) from the General Commands Manual β€” go forth and ping responsibly πŸŒŸπŸ’…

πŸ“¦ where this page comes from