BROADNET TECHNOLOGIES

BROADNET TECHNOLOGIES

How to integrate SMS API in Python?

August 02, 2017 BroadNet, Integrating SMS API, Integrating SMS API in Python, SMS API, SMS API in Phtyon, sms verification api, sms verification api uae
How to integrate SMS API in Python
When it comes to developing an API and then necessarily to channelize it across platforms, you want the trust and simplicity of a trusted platform where you can easily get the codes from, and then use the codes in order to integrate it with your server.
SMS API helps in a number of ways. It streamlines the productivity of an application, helps send bulk SMS to targeted customers, uncomplicated the entire process of communication, eases the order and bulk system. An SMS API acts as a gateway of sending and receiving SMS thereby simplifying the entire method of communication.

In order to integrate SMS API in Python?

There are ranges of ways you can easily integrate SMS API in Python. Before using any SMS gateway, you need to focus on a few important things. Just ensure to visit a trusted and popular API and SMS gateway service provider.
API and SMS gateway service provider
Python is a sophisticated, universal, powerful programming language. The easy and simple syntax make Python a great language easy to experiment. It is simple and easy to integrate an API in Python. As we mentioned earlier, before integrating an API, there are a few important things that you need to know; some of which include -
  • Visiting the website of a good SMS API service provider
  • Copy the codes of integration
  • Paste the code on your server
  • Test the results and thereby based on result, integrate the codes
  • BroadNet is one of the trusted SMS gateway service providers.
You just need to copy the following code and paste it on the server before testing
class SmsAPI(object):
        # <summary>
        # Specify complete Url of SMS gateway
        # </summary>
        def get_ApiUrl(self):

        def set_ApiUrl(self, value):

        ApiUrl = property(fget=get_ApiUrl, fset=set_ApiUrl)

        # <summary>
        # User name supplied by provider
        # </summary>
        def get_user(self):

                       def set_user(self, value):

                       user = property(fget=get_user, fset=set_user)

        # <summary>
        # Password supplied by provider
        # </summary>  
        def get_pass(self):

                       def set_pass(self, value):

                       pass = property(fget=get_pass, fset=set_pass)
    
        # <summary>
        # SID supplied by provider
        # </summary>  
        def get_sid(self):

                        def set_sid(self, value):

                        sid = property(fget=get_sid, fset=set_sid)

                        def __init__(self, ApiUrl, user, pass, sid):
                                            self.ApiUrl = ApiUrl
                                            self.user = user
                                            self.pass = pass
                                            self.sid = sid

                        def __init__(self, ApiUrl, user, pass, sid):
                                            self.ApiUrl = ApiUrl
                                            self.user = user
                                            self.pass = pass
                                            self.sid = sid

          def SendSMS(self, Recipient, MessageData):
                                            if self.ApiUrl.Trim() == "" or self.user.Trim() == "" or self.pass.Trim() == "" or self.sid.Trim() == "":
                                                             raise Exception("All Properties were required")
                                            #Status = SMS(User, SURL, SPort, Passw, number, MessageData, MessageType); //Sending SMS
                                            #string createdURL = "http://78.108.164.67" + ":" + "8080" + "/websmpp/websms" +
                                            #"?user=" + "SPDDLC" +
                                            #"&pass=" + "s@KJ8QH9" +
                                            #"&sid=" + "SPDDLC" +
                                            #"&mno=" + Recipient +
                   #"&text=" + MessageData +
                                            #"&type=" + "1" +
                                            #"&esm=" + "0" +
                                            #"&dcs=" + "0";
                                            # MessageBox.Show(createdURL);
                                            createdURL = self.ApiUrl + "?user=" + self.user + "&pass=" + self.pass + "&sid=" + self.sid + "&mno=" + Recipient + "&text=" + MessageData + "&type=" + "1" + "&esm=" + "0" + "&dcs=" + "0"
                   try:
                                                             myReq = WebRequest.Create(createdURL)
                                                             #MessageBox.Show("2");
                                                             # Get response from SMS Gateway Server and read the answer
                                                             myResp = myReq.GetResponse()
                                                             # MessageBox.Show("21");
                                                             respStreamReader = System.IO.StreamReader(myResp.GetResponseStream())
                                                             # MessageBox.Show("22");
                                                             responseString = respStreamReader.ReadToEnd()
                                                             #  MessageBox.Show("2");
                                                             respStreamReader.Close()
                                                             myResp.Close()
                                         except Exception, ex:
                                                             raise ex
                                         finally:
                                         return "success"
This is the simplest and quickest way to easily integrate the API.
Share This:
Facebook Twitter Google+ Pinterest Linkedin Whatsapp
sms verification api uae
at August 02, 2017
Labels: BroadNet, Integrating SMS API, Integrating SMS API in Python, SMS API, SMS API in Phtyon, sms verification api, sms verification api uae

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Popular

  • BroadNet Technologies offers best Mobile Car Rental App for iPhone, iPad, Android and Windows
    Does your job coerce you to be on the move often and you feel sorry for not being able to find a rental car for your next trip? If yes, we a...
  • How SMS Marketing is a Better Option for Enhancing Your App Downloads
    To increase your app downloads by maximum individuals, you cannot exclusively rely on just one technique in this cutthroat competition. That...
  • Testing Mobile Apps with BroadNet Technologies: The Leader in Testing Mobile Apps
    Mobile App Testing Overview Mobile App Testing is a very dedicated and fundamental process of testing applications for a variety of mobil...
  • BroadNet - Get the top of the line SEO services & solutions from the best IT Company in the industry
    At BroadNet Technologies , we take the opportunity to introduce ourselves as one of the leading Lebanon and UK-based SEO Company. Our rock-h...
  • Become a BroadNet reseller- Maximize the Cost-effective Business Opportunity to Earn Unlimited Money!
    BroadNet Technologies has etched a name in the industry as one of the fastest growing and reputable telecommunications and IT services prov...
  • Maximize BroadNet Technologies’ international bulk SMS and Reseller Services and reap great marketing benefits
    Being a businessperson, you would already be aware of the cutthroat competition that is spreading like a wildfire. Therefore, without a doub...
  • BroadNet Technologies - The Industry's best SMS Gateway Service Provider at Highly Cheap Costs
    The Leading SMS Gateway Service Provider BroadNet Technologies offers the top-quality international bulk SMS at very affordable price rate...
  • Harness the Power of SMS to Maximize your Mobile App Downloads
    Sending your App via SMS If you have a special App that you intend to present in front of your targeted visitors/audiences so that they ca...
  • BroadNet - Hire our SEO services and get excellent ranking of your website with guarantee
    BroadNet Technologies , is one of the fastest growing companies offering search engine optimization services. Headquartered in Lebanon and ...
  • BroadNet Technologies - The Established Bulk SMS and Reseller Bulk SMS Service Provider
    Bulk SMS Service Among the mass of proven marketing techniques and tools, Bulk SMS marketing has recently surfaced the most usable and eff...

Pages

  • Contact Us - BroadNet Technologies
Created By | BroadNet Technologies | SoraTemplates