aitoehigie
aitoehigie

Reputation:

How do I enable SMS notifications in my web apps?

I have a web application and I would like to enable real time SMS notifications to the users of the applications.

Note: I currently cannot use the Twitter API because I live in West Africa, and Twitter doesn't send SMS to my country.

Also email2sms is not an option because the mobile operators don't allow that in my country.

Upvotes: 1

Views: 3279

Answers (7)

Arya
Arya

Reputation: 1469

If your country is in this list, Twilio is an extremely easy API to use :)

Upvotes: 0

Vlatko Šurlan
Vlatko Šurlan

Reputation: 444

Warning: extremely elegant solution ahead! (Android app)

If you want to send SMS to any number in as simple of a manner as sending an e-mail:

mail('configuredEMail@configuredDomain', '0981122334', 'SMS message'); // PHP

or even:

echo 'SMS message' | mail -s '0981234567' [email protected]

or even from a GUI mail client, then read on.

To skip explanations google Evorion SMS Gateway.

What does it do? It forwards e-mail to SMS with a built-in battery saver. In order to send an SMS you simply send an email to '[email protected]' with Subject 'phoneNumberToForwardTo'.

Code contributions welcome.

Upvotes: 0

Dawie Strauss
Dawie Strauss

Reputation: 3706

Another SMS gateway with a Python interface is TextMagic. Their Python API is available from the Google Code project textmagic-sms-api-python. They have libraries available for other languages as well; all wrapping a simple HTTPS API.

Code samples from the project website:

How to send an SMS:

import textmagic.client
client = textmagic.client.TextMagicClient('your_username', 'your_api_password')
result = client.send("Hello, World!", "1234567890")
message_id = result['message_id'].keys()[0]

And retrieve its delivery status:

response = client.message_status(message_id)
status = response[message_id]['status']

(Full disclosure: I am the author of the Python wrapper library)

Upvotes: 3

Kevn
Kevn

Reputation: 51

The easiest way to accomplish this is by using a third party API. Some I know that work well are:

  • restSms.me
  • Twilio.com
  • Clicatell.com

I have used all of them and they easiest/cheapest one to implement was restSms.me

Hope that helps.

Upvotes: 2

HMM
HMM

Reputation: 3013

There are a couple of options.

  • Get some kind of SMS modem or connectivity and use your own cell phone using smslib. I am sorry I don't provide python interfaces but my experience is Java. The downside is that you will pay the full consumer rate. And you will have to put a cell phone on your data center.
  • Connect to SMPP gateway. You will have to talk to the mobile operator in order to make this work. There is a library called jsmpp here. Again, I am sorry it is not python.
  • If it is too much of a hassle you could use an intermediary, which provides HTTP-SMS gateways, like this one. That's easy because you don't need to use SMPP and your system administrators wont bark at you for putting cell phones in the datacenter.

Upvotes: 4

Lorenzo
Lorenzo

Reputation: 4648

What about using a proper sms gateway. These guys got APIs for several languages:

http://www.clickatell.com/developers/php.php

There is an unofficial Python API too

http://www.arnebrodowski.de/projects/clickatell/

Upvotes: 3

Douglas Leeder
Douglas Leeder

Reputation: 53310

I don't have any knowledge in this area. But I think you'll have to talk to the mobile operators, and see if they have any API for sending SMS messages. You'll probably have to pay them, or have some scheme for customers to pay them. Alternatively there might be some 3rd party that implements this functionality.

Upvotes: 0

Related Questions