How to send sms to users from Django application?

+5 votes
I'm looking for an option to send otp to users's registered mobile number irrespective of country when they login.

I tried with twilio(trial version) but it sends msgs from 9am to 9pm and also messages will be send only to a number verified by  twilio.

As per my understanding twilio doesn't support this feature for all countries. Any help appreciated.
Nov 13, 2018 in Python by Manu
• 170 points
@Manu yes you are correct Twilio sends message only to twilio verified numbers.

You can use Google service api known as pygooglevoice
Thanks Priyaj. I will try this.

I used pygooglevoice but I was getting below error.", line 75, in login
  galx ="type=\"hidden\"\s+name=\"GALX\"\s+value=\"(.+)\"", content).group(1)
AttributeError: 'NoneType' object has no attribute 'group'

I tried few workarounds but it did not work. I implemented the functionality using Twilio Authy api.

Hey @Manu. I tried this and it worked:

import sys;
from googlevoice import Voice

voice = Voice()

phoneNumber = "+919886185535"
if (phoneNumber == ""):
    print("Hi there")

text = sys.argv[1:]
if (text == ""):
    print("You must specify a message.")

voice.send_sms(phoneNumber, text)


Hello Mr.Manu. I am facing the same problem with pygooglevoice. Could you please tell me how you implemented it using Twilio Authy api. Thank you.
@Manu the link that you sent has good content. How are you using it in your case?

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Python

0 votes
1 answer

How do you configure Django to send mail through Postfix?

You can do this by adding ...READ MORE

answered Feb 25, 2019 in Python by SDeb
• 13,230 points
0 votes
1 answer
0 votes
1 answer

how to download and install Django rest framework?

To install Django, you can simply open ...READ MORE

answered Apr 24, 2018 in Python by Christine
• 15,810 points
0 votes
1 answer

How to exit from Python without traceback?

shutil has many methods you can use. One ...READ MORE

answered May 10, 2018 in Python by charlie_brown
• 7,760 points
0 votes
1 answer

How to get text label from SAP using pywinauto[python]

Hi. Can you please tell me what ...READ MORE

answered Jun 28, 2018 in Python by Nietzsche's daemon
• 4,260 points
0 votes
1 answer

How to exit from Python without traceback?

Perhaps you're trying to catch all exceptions ...READ MORE

answered Jul 31, 2018 in Python by Priyaj
• 57,530 points
0 votes
1 answer

How to get all related Django model objects in Python?

This actually gives you the property names ...READ MORE

answered Nov 14, 2018 in Python by Nymeria
• 3,540 points

edited Dec 18, 2018 by Nymeria 1,552 views
0 votes
1 answer