0
votes

I am using the correct test accound sid and auth token. The params entered are From, To, and Body like so:

Request Url: https://api.twilio.com/2010-04-01/Accounts/{mytestaccoundsid}/SMS/Messages Request Method: POST Status Code: 400 Params: { "From": "+15005550001", "To": "+15005550002", "Body": "Testing" }

For some reason it keeps saying "A 'From' phone number is required." This error is not one of the expected errors listed: https://www.twilio.com/docs/api/rest/test-credentials

2
The number you are using is considered "invalid" by the test creds, have you tried using the number +15005550006 to see if that works?phalt
Yes, I have tried several different numbers they list on the test-credentials page. As well I have also tested real numbers. All return the same response. My understanding is the test numbers should return the specific error code listed. So the error code should have been 21421 but it returns 21603 instead.Csharpfunbag

2 Answers

0
votes

Sending SMS in twilio returns 21603 : A 'From' number is required

The above link solved the same problem for me. Check it out. The key is that you have to use urlencoded parameters

0
votes

Actually, I talked with their tech support and they support JSON encoded parameters but they to could not get it to work. Looks like its a bug on their part.