Brian
Brian

Reputation: 51

Twilio SMS Sending from Jordianian Number

I am trying to build a two way communications app through SMS using Twilio. I'm using Google Apps Script and the code is as follows:

function sendSms(to, body) {
  var messages_url = "https://api.twilio.com/2010-04-01/Accounts/[ACCOUNTSID]/Messages.json";

  var payload = {
    "To": to,
    "Body" : body,
    "From" : "+GERMANPHONENUMBER"
  };

  var options = {
    "method" : "post",
    "payload" : payload
  };

  options.headers = { 
    "Authorization" : "Basic " + Utilities.base64Encode("ACCOUNTSID:ACCOUNTSECRET")
  };

  UrlFetchApp.fetch(messages_url, options);
}

It works as advertised, and my target audience are people in Greece, so I am testing with a local Greek cell phone.

It works, and the messages sends and receives successfully, except on the receiving end it appears to send from +962 numbers, which are Jordanian. This doesn't work if I want to create a two way communications system, since it's obviously not the same German number I'm sending from.

As context, I need to be able to send TO Greek numbers, but since Twilio doesn't support virtual numbers in Greece with SMS, I tried a different EU number (currently EU to EU numbers don't have increased texting fees, so I just picked a random EU country). If a different EU country behaves differently, I am open to using that as well if it fixes this.

Does anyone know why it's being sent from a Jordanian number? Does anyone know any alternatives to fix this and accomplish what I'm looking for? Any help would be awesome. Thanks!

Upvotes: 2

Views: 337

Answers (1)

Brian
Brian

Reputation: 51

Update: Heard back from support. It turns out that due to restrictions and the inability to do two way communications via SMS with Greece, the sender ID does get changed. Looks like it's a no-go for this particular use case.

Upvotes: 3

Related Questions