4

Using Twilio test credentials allows simulation of sending SMS messages from/to valid numbers, non-SMS-capable numbers, invalid numbers, etc., by using specific numbers for the value of the 'From'/'To' parameter of the HTTP POST to Twilio.

Is there any way to use Twilio test credentials to simulate sending (successfully or unsuccessfully) using a value for the 'MessagingServiceSid' parameter instead of a value for the 'From' parameter?

M Somerville
  • 4,499
  • 30
  • 38
palimpsestor
  • 1,038
  • 1
  • 8
  • 28

2 Answers2

1

The test credentials page says: "All of the existing outbound SMS parameters will work, with the exception of MessagingServiceSid." so it doesn't sound like it is currently possible.

M Somerville
  • 4,499
  • 30
  • 38
0

Twilio developer evangelist here.

I'm afraid the test credentials only work for the following endpoints:

  • Buying phone numbers: POST /2010-04-01/Accounts/{TestAccountSid}/IncomingPhoneNumbers
  • Sending SMS messages: POST /2010-04-01/Accounts/{TestAccountSid}/Messages
  • Making calls: POST /2010-04-01/Accounts/{TestAccountSid}/Calls
philnash
  • 70,667
  • 10
  • 60
  • 88
  • Right, but when posting to `.../{AccountSid}/Messages`, you can normally supply either a `From` or a `MessagingServiceSid` field. If you're using test credentials, there are various test numbers that you can supply in the `From` field to elicit various responses. The question was whether there are any analogous values that you can put in the `MessageingServiceSid` field. – palimpsestor Sep 19 '16 at 22:27
  • Bah, you're right I read your question wrong. I will test this and get back to you. – philnash Sep 19 '16 at 22:29