Thursday 26 September 2013

Send SMS Using Twelio Rest api


1.You have to add .dll (web reference) of Twelio which easily available in Nuget(VS2010) 
2.Then use below code... 

public Twilio.SMSMessage GetEMPLOYEE_MASTER()
        {
           //send sms success

                string AccountSid = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
                string AuthToken = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";

                var twilio = new TwilioRestClient(AccountSid, AuthToken);
              //  var message = twilio.SendSmsMessage("+15005550006", "+919033865290", "hello every body", "http://api/call?status=sent");
                var message = twilio.SendSmsMessage("+15005550006", "+919999999999", "hello every body", "https://api.twilio.com");
               
                string sts = message.Status;
                Type t = message.GetType();
                Console.WriteLine(message.Sid);

                           return message;
}




NOTE : AccountSid --> you can get from Twelio Account

       AuthToken --> you can get from Twelio Account

       +15005550006 --> Twelio Test case number  ....when you want to send realy sms than use twelio number which you can get from twelio account ..Its chargeble.

8 comments:

  1. i am just sending message on my number only plz tell me solution for that

    ReplyDelete
  2. than you have to set static number in your code ....
    means user write message and send than you 'll get message right?
    for it you have to just use your static number

    ReplyDelete
  3. The information about Bulk SMS given in this article was awesome. Thanks for sharing with us.
    bulk sms services in Indore | bulk sms services provider

    ReplyDelete
  4. Bulk SMS Marketing is one of the most practical options to market your product. Bulk SMS are best way to communicate personal computer to mobile phone and bulk sms has become the most effective, cheap and reliable means of communication, advertising, marketing, also. Thanks for sharing...
    Bulk SMS Marketing Services across India

    ReplyDelete
  5. i wany to send sms by using asp.net

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete
  7. SMS Integration using asp.net is the best option for your business promotion or advertising. It is today’s easiest and fastest way to communicate with your customer on large scale. asp.net sms

    ReplyDelete
  8. nice post.this is very help full post for setup api for sms sending.
    we also provide SMS and Email service in all over India. We will provide best service in this sector. over company it Hind Adsofr Pvt Ltd located in Noida,delhi ncr

    ReplyDelete