SMS/MMS Messaging via Twilio
13:58 07 Apr 2026

The problem I'm trying to solve is to be able via Google Sheets Apps script to send simple messages to my cell and my wife's cell. Not looking for thousands of messages per month just 10-20 messages weekly. No replies just outgoing to each phone. To that end searching I found Twilio which seemed appropriate. No massive cost, looks like add credit and then just message until that balance runs out. So I signed up.

Now I googled for code to use in a Google Sheets App script and got the following

function sendTwilioSMS() {
  var accountSid = 'YOUR_TWILIO_ACCOUNT_SID';
  var authToken = 'YOUR_TWILIO_AUTH_TOKEN';
  var fromNumber = 'YOUR_TWILIO_PHONE_NUMBER'; // e.g., "+1234567890"
  var toNumber = 'DESTINATION_PHONE_NUMBER';   // e.g., "+1987654321"
  var message = 'Hello from Google Apps Script via Twilio!';

  var url = 'https://api.twilio.com/2010-04-01/Accounts/' + accountSid + '/Messages.json';

  fromNumber = 'MyNumber'; // e.g., "+1234567890"
  toNumber = 'MyDestNumber';   // e.g., "+1987654321"
  message = 'Will you let me know if you get this?!';

  var payload = {
    'To': toNumber,
    'From': fromNumber,
    'Body': message
  };

  var options = {
    'method': 'post',
    'payload': payload,
    'headers': {
      'Authorization': 'Basic ' + Utilities.base64Encode(accountSid + ':' + authToken)
    }
  };

  var response = UrlFetchApp.fetch(url, options);
  Logger.log(response.getContentText());

  return 0;
}

The code seems to work, except when I tried to send a text to my phone which is listed in the account registered phone list. It appears that I have to register a A2P 10DLC number but it talks about campaign costs, etc. Is Twilio even for what I'm looking for? Do I need to register my wife's phone so that I send to me from hers and to her from my number?

twilio twilio-api