Note that there are some explanatory texts on larger screens.

plurals
  1. POTwilio's TwilioRestClient SendSmsMessage returns null
    text
    copied!<p>I have everything working locally, but when I test Twilio's service on an Amazon EC2 Debian 6.0.6 server running Mono 2.10.9, I find that sending SMS messages no longer works. I believe the problem lies somewhere in the server configuration, as I am using the latest Twilio (3.5.6), RestSharp (104.1) and JSON.NET (4.5.11) libraries, and I can guarantee that the variables used in the following method call are not empty at runtime.</p> <pre><code>var client = new Twilio.TwilioRestClient("{my account number}", "{my account token}"); var smsMessage = client.SendSmsMessage("{my account phone number}", "{my mobile phone number}", "Hello World!"); </code></pre> <p>Using ntop, I have seen that there are bytes being sent/received to/form this reqeuest, but the smsMessage result is still null. The SendSMSMessage function utilizes the RestSharp library, particularly the RestClient's Execute function, which invokes a Deserialize method and returns an IRestResponse in which the Data field is null in this case. </p> <p>I have seen some indications online that the problem may lie in the deserialization process, but, as I've ensured I am using the latest version of JSON.NET, I am not sure what other steps to take here.</p> <p>Do you have any suggestions on resolving the problem and do you suspect it is a code or server issue? Also do you have any advice, using Debian, how I might further debug this interaction, perhaps even to get the full byte response externally from the application?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload