Hy... I'm learning twilio rightnow, and I have seen a post here http://www.markhagan.me/Samples/Send-SMS-Using-Twilio-ASPNet
I have made my own code because in above site "sendSMSMessage" is deprecated now, but Here is my code :
using System.Text;
using System.Threading.Tasks;
using Twilio;
namespace SMSUsingTwilio
{
class Program
{
static void Main(string[] args)
{
String ACCOUNT_SID = "ACMYSID";
String AUTH_TOKEN = "40MYAUTHTOKEN";
TwilioRestClient client = new TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN);
Message Response = client.SendMessage("(732)305-8856", "+6285220446195", "Hellow Hyosoka Poipo :D");
Console.WriteLine(Response.Status);
Console.WriteLine(Response.AccountSid);
Console.WriteLine("SMS Berhasil di kirim");
Console.ReadLine();
}
}
}
The problem is I don't any sms message to my phone number and even I don't get any response in my C# project:

So what's wrong here...?? Please help..Thank you so much...:)
After seeing mr.David answer, I realized that my phone number was not yet verified. So go to this link for verifying my number:
https://www.twilio.com/user/account/phone-numbers/verified
After that, I run my project agian and here is the result :

Yeeeiii...Thanks so much for your comments and answer... I really appreciate it... :)
The above looks fine:
var message = client.SendMessage("(732)305-8856", "+6285220446195", "Hellow Hyosoka Poipo :D");
Example:
static void Main(string[] args)
{
string AccountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
string AuthToken = "[AuthToken]";
var twilio = new TwilioRestClient(AccountSid, AuthToken);
var message = twilio.SendMessage("(732)305-8856", "+6285220446195", "Hellow Hyosoka Poipo :D");
);
Console.WriteLine(message.Sid);
}
Check this out: https://www.twilio.com/docs/api/rest/sending-messages
I don't recognise your phone numbers, if the above example does not work it will be an issue with your account or the number format.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With