5

I have to develop an application where I need to send SMS to the users on a particular action by the users.

I have heard of kannel with PHP, is there some help for the same in Python as well or is there any other better open source sms gateway which I can use with my application?

Please suggest.

Thanks in advance.

3
  • There are some really good answers here. Are you going to do some upvoting and then select one that you like? I know it's years later but it would be cool to get this answered ;-) Commented Feb 16, 2014 at 21:38
  • @nicorellius I'm really sorry that I could not select any of the answers from here. There are so many good options here but I had to drop the sms feature due to various other policy related difficulties in my country. Commented Feb 17, 2014 at 4:14
  • Often in that case, I will still choose one that met your original question requirements, and select it as the answer. There are valid answers here, so I would think that regardless of your status, you could still choose a "correct" answer... Thanks for the note anyway. Good luck. Commented Feb 17, 2014 at 6:00

6 Answers 6

3

Typically you would use normal HTTP GET or POST requests against an SMS Gateway, such as Clickatell and many many others.

Sign up to request clarification or add additional context in comments.

Comments

3

Twilio (where I work) has an OSS Python helper library which makes working with their SMS service really easy.

Comments

1

I was struggling with this for some time and really liked the Twilio option. But then I dug deeper and found that there is a Google Voice API called pygooglevoice that works. Clean, easy... No carrier lookup... For example, set up a virtualenv and install with pip:

pip install pygooglevoice

Then use something like this:

from googlevoice import Voice
from googlevoice.util import input

def send(number, message):
    user = '[email protected]'
    password = 'password'

    voice = Voice()
    voice.login(user, password)

    #number = input('Number to send message to: ') # use these for command method
    #message = input('Message text: ')

    voice.send_sms(number, message)

Please note that I have done limited testing with this so I'm not sure all the pros and cons. It's quite possible that there are limitations I haven't discovered yet. But in the time I've played around with it, I've been happy.

Comments

0

[Update] Since the email based solution won't work for you, check out Twilio. Clean APIs, and I hear good things about them.

If you know the carrier the user is on it might be easiest to use the email-to-sms services provided by just about all of the mobile carriers. Here's an article on addresses for many providers.

If that works for you (eg. if you know the number/carrier beforehand or you can ask the user for the carrier as well as their number), then all you have to do is send email to the appropriate address and it'll be sent as an SMS to the user.

1 Comment

Thanks for your reply Parand. But I would prefer some open source SMS gateway, as relying on carrier does not seems to be a good idea for now. Anyways, your's really a good option.
0

Take a look at django-smsgate (BSD licensed) application for working with SMS through SMS gateways.

Comments

0

I just wrote a basic Twilio demo app using Django, which sends SMS messages to users and also processes the SMS responses. I posted the code to github and wrote some explanatory blog posts.

The top level post is here but you can just grab all the code from GitHub. Note that my particular example uses LinkedIn for authentication, but the second and third blog posts cover twilio specific methods. That way you can see if this is an option that'll work for you.

Hope this helps :-)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.