bastien34 / FreeMobileSMS

πŸπŸ“² Python client to send SMS via french mobile operator Free Mobile

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Free Mobile SMS

Build Status

Logo Free Mobile

Description

Python client to send SMS via french mobile operator Free Mobile.

Configuration

With environment variables

You need to set SMS_LOGIN and SMS_TOKEN variables.

With configuration file

You have to write your informations in a file like this :

{
    "login": YOUR_FREE_MOBILE_LOGIN,
    "token": TOKEN_GIVEN_BY_FREE_MOBILE
}

Now, you can have to use it with specific flag (--config=FILE).

Usage

$>./sms.py "Hello World"
200 Message send

$>./sms.py --config=my_config.json "Hello world"
200 Message send

$>echo "Foo" | ./sms.py
200 Message send

$>echo "Bar" > tmp && ./sms.py < tmp
200 Message send

Possible return values

  • 200 : Message send
  • 400 : Missing parameter
  • 402 : Too much messages send
    • You have to wait a little to reuse it.
  • 403 : Service not enable
  • 500 : Server not available
    • You have to try later.

Want to use this service with an other Python project?

You just have to reuse the FreeMobileSMS class, it is easy to use ;)

About

πŸπŸ“² Python client to send SMS via french mobile operator Free Mobile

License:MIT License


Languages

Language:Python 100.0%