twilio - Sends a text message to a mobile phone through Twilio.

Author:Matt Makai

Synopsis

New in version 1.6.

Sends a text message to a phone number through an the Twilio SMS service.

Options

parameter required default choices comments
account_sid yes
    user's account id for Twilio found on the account page
    auth_token yes
      user's authentication token for Twilio found on the account page
      from_number yes
        what phone number to send the text message from, format +15551112222
        msg yes
          the body of the text message
          to_number yes
            what phone number to send the text message to, format +15551112222

            Note

            Requires urllib

            Note

            Requires urllib2

            Examples


            # send a text message from the local server about the build status to (555) 303 5681
            # note: you have to have purchased the 'from_number' on your Twilio account
            - local_action: text msg="All servers with webserver role are now configured."
              account_sid={{ twilio_account_sid }}
              auth_token={{ twilio_auth_token }}
              from_number=+15552014545 to_number=+15553035681
            
            # send a text message from a server to (555) 111 3232
            # note: you have to have purchased the 'from_number' on your Twilio account
            - text: msg="This server's configuration is now complete."
              account_sid={{ twilio_account_sid }}
              auth_token={{ twilio_auth_token }}
              from_number=+15553258899 to_number=+15551113232

            Note

            Like the other notification modules, this one requires an external dependency to work. In this case, you’ll need a Twilio account with a purchased or verified phone number to send the text message.