steps-to-send-sms-from-odoo-application-to-mobile-number.png
Blogger_636316574414355870.jpg
By: Saritha

Steps to Send SMS from Odoo Application to Mobile Number

Short Message Service (SMS) has become a common tool for communication all over the world. It is very simple to send SMS from Odoo to any mobile number in the world using web application programming interface (API). Let's have a look at how it works.

 

Web Application Interface (API)

To send SMS, we need SMS Service provider. There are a lot of websites which provide Sms API Gateway. Some of them are listed below.


1. Twilio

2. Nexmo

3. Msg91

4. Textlocal

5. Sms Horizon

 

How to get API from SMS Service Providers

To get SMS API, First, you need to set up an account on any one of the providers listed above or anyone, which you know. You need to pay a certain amount for sending SMS. The amount varies on providers you suggest. First, select a provider and then take a free trial.


1. Sign up using your mobile number and email address,

2. Message with secret code is sent to your registered mobile number.

3. Login using that secret key.

4. Get SMS Authentication key and URL (This is what we need to send SMS).

 

Integrating Odoo with SMS

1.Create a file named


First, we need to create a .py file where we need to write code for sending SMS. This is the file that we run to send SMS to any mobile number


2.Code for sending SMS


        import urllib
        import urllib2
        authkey =”xxxxxxxxxxxxxxxxxxx”
        mobiles = “xxxxxxxxxxxxxxxxxxxxx”
        message = "Connection Test Succeeded"
        sender = "112233"
        route = "default"
        values = {
                  'authkey': authkey,
                  'mobiles': mobiles,
                  'message': message,
                  'sender': sender,
                  'route': route
                  }
        url = “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”
        postdata = urllib.urlencode(values)
        req = urllib2.Request(url, postdata)
        response = urllib2.urlopen(req)
        output = response.read()
        print output
        return True

 

3.Authentication key and URL


Paste authentication key, URL, and mobile number to above-described fields. You can also change the content of a message.

 

4. Free Trial


Take a free trial by running above code in Odoo. You can see the message given below on given number.





Comments

1

Hello,Thanks for sharing the post! I just wanna say one thing. Nowadays, bulk SMS marketing has become a popular medium to connect with customers or to promote your product among the large clientele. and with help of Odoo Application it will become more it like you just plan campaign to schedule sms




Leave a comment

 
Calicut

Cybrosys Technologies Pvt. Ltd.
Neospace, Kinfra Techno Park
Kakkancherry
Kerala, India - 673635

London

Cybrosys Limited
2 Sheen Road,
Richmond, London
England - TW9 1AE

Kochi

Cybrosys Technologies Pvt. Ltd.
1st Floor, Thapasya Building,
Infopark, Kakkanad,
Kochi, India - 682030.

Bangalore

Cybrosys Techno Solutions
The Estate, 8th Floor,
Dickenson Road,
Bangalore, India - 560042

Send Us A Message