How do I enable SMS notifications in my web apps?

前端 未结 7 899
南笙
南笙 2021-01-15 17:55

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 becau

相关标签:
7条回答
  • 2021-01-15 18:22

    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.

    0 讨论(0)
  • 2021-01-15 18:24

    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/

    0 讨论(0)
  • 2021-01-15 18:29

    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.
    0 讨论(0)
  • 2021-01-15 18:33

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

    0 讨论(0)
  • 2021-01-15 18:36

    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)

    0 讨论(0)
  • 2021-01-15 18:39

    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.

    0 讨论(0)
提交回复
热议问题