TwilioSendSMS


#1

Service Name: TwilioSendSMS
Cost: 0.001 BLOCK
Description: Send SMS messages through Blocknet’s console or CLI worldwide. All SMS messages will begin with: “Message from XRouter:”.

A small fee of 0.001 BLOCK is in place to reduce spam usage of the call due to limitations on the service provider being used.

Note:

  • Some carries may block incoming SMS messages like these.

  • Ensure your wallet is unlocked and has 2+ UTXO’s to pay for the small fee. Ensure maxfee= is set and not ‘0’ (free calls only) in xrouter.conf:

[xrs::TwilioSendSMS]
maxfee=0.1

Additional Documentation Link: Phone numbers need to be formatted using E.164: https://www.twilio.com/docs/glossary/what-e164

Usage Instructions:
xrService TwilioSendSMS [to_phone_number] ["message"]

Example Call:
xrService TwilioSendSMS +15551234567 "Hello World"

Parameter Type Description Example
to_phone_number string Phone number using “+” and country code in E.164 format +15551234567
“message” string Message body in quotations “Hi there, how’s it going?”

#2

Plugin Update:

  • Script updated to handle international numbers

  • Unlocked Geography Permissions for all international numbers

Notes:

  • When sending international SMS messages the delivery can sometimes take a couple minutes

  • If you do not receive the SMS, DM me on Discord and we can attempt to sort it out. Some carriers will block incoming SMS messages.

  • If this plugin usage increases the fee will be increased, as international messaging can range up to $0.10 USD/SMS


#3

Plugin Update:

  • Instead of just outputting a sent response, more information is made available after the service is called.

  • New output example:

{
    "reply" : [
        {
            "sms_id" : "SM8f39577bd098429f853a48e6b898471f",
            "date_created" : "Sat, 15 Jun 2019 02:30:27 +0000",
            "status" : "queued",
            "error_code" : null,
            "error_message" : null,
            "error_help" : null
        }
    ],
    "uuid" : "D0F58F65-ACE2-44EF-8B6D-F377E3C53387"
}
  • Every SMS sent will have its own unique ID; [sms_id]

    • This ID can be used with this XCloud plugin to get delivery status info: TwilioSMSStatus
  • If your service call has no errors you will see null in the "error_..." section.

  • If your service call has errors you will see the "error_..." section populate.