Enable Dark Mode!
steps-to-send-sms-from-odoo-application-to-mobile-number.png
By: Saritha

Steps to Send SMS from Odoo Application to Mobile Number

Technical Marketing

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 a web application programming interface (API). Let's have a look at how it works.

Web Application Interface (API)

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


1. Twilio

2. Nexmo

3. Msg91

4. Textlocal

5. Sms Horizon


You can have a look at the video on

How to Configure MSG91 Odoo SMS Integration


for more info about the Odoo SMS Integration MSG91

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. A message with a 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 the above code in Odoo. You can see the message given below on the given number.



If you need any assistance in odoo, we are online, please chat with us.



2
Comments

rupesh

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

18/07/2018

-

1:08AM

Avinash Mavuru

thank you | But were we need to save the file in addons? please elaborate

13/02/2019

-

11:07PM



Leave a comment



whatsapp_icon
location

Calicut

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

location

Kochi

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

location

Bangalore

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

Send Us A Message