Skip to content

Commit 658f0de

Browse files
committed
1 parent 84d6d44 commit 658f0de

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

FreeSMS.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
66
- Warning: it only works in France to a French number, using the mobile operator Free Mobile.
77
- Warning: some initial configuration is required before running this script (see the error messages).
8+
- Activate it on: https://mobile.free.fr/account/mes-options/notifications-sms
89
- Copyright 2014-20 Lilian Besson
910
- License MIT.
1011
@@ -135,7 +136,7 @@ def openSpecialFile(name, number=''):
135136
print("To create '~/.smsapifreemobile_user.b64', use your Free Mobile identifier (a 8 digit number, like '83123456'), and execute this command line (in a terminal):")
136137
printc("<black>echo '83123456' | base64 > '~/.smsapifreemobile_user.b64'<white>".format())
137138
elif name == "password":
138-
print("To create '~/.smsapifreemobile_password.b64', go to this webpage, https://mobile.free.fr/moncompte/index.php?page=options&show=20 (after logging to your Free Mobile account), and copy the API key (a 14-caracters string on [a-zA-Z0-9]*, like 'H6ahkTABEADz5Z'), and execute this command line (in a terminal):")
139+
print("To create '~/.smsapifreemobile_password.b64', go to this webpage, https://mobile.free.fr/account/mes-options/notifications-sms (after logging to your Free Mobile account), and copy the API key (a 14-caracters string on [a-zA-Z0-9]*, like 'H6ahkTABEADz5Z'), and execute this command line (in a terminal):")
139140
printc("<black>echo 'H6ahkTABEADz5Z' | base64 > '~/.smsapifreemobile_password.b64<white>' ".format())
140141

141142

@@ -169,7 +170,7 @@ def openSpecialFile(name, number=''):
169170
400: "Un des paramètres obligatoires est manquant.",
170171
402: "Trop de SMS ont été envoyés en trop peu de temps.",
171172
403: """Le service n'est pas activé sur l'espace abonné, ou login / clé incorrect.
172-
Allez sur '<black>https://mobile.free.fr/moncompte/index.php?page=options&show=20<white>' svp, et activez l'option correspondate.""",
173+
Allez sur '<black>https://mobile.free.fr/account/mes-options/notifications-sms<white>' svp, et activez l'option correspondate.""",
173174
500: "Erreur côté serveur. Veuillez réessayez ultérieurement.",
174175
1: "Le SMS a été envoyé sur votre mobile ({}).".format(number) if len(numbers) <= 1 else "Le SMS a été envoyé sur vos numéros ({}).".format(numbers),
175176
"toolong": "<red>Attention<white> : le message est trop long (+ de <black>{}<white> caracters, soit plus de 3 SMS).".format(STR_MAX_SIZE)
@@ -179,7 +180,7 @@ def openSpecialFile(name, number=''):
179180
400: "One of the necessary parameter is missing.",
180181
402: "Too many SMSs has been sent in a short time (you might be a spammer!).",
181182
403: """Access denied: the service might not be activated on the online personnal space, or login/password is wrong.
182-
Please go on '<black>https://mobile.free.fr/moncompte/index.php?page=options&show=20<white>' please, and enable the corresponding option.""",
183+
Please go on '<black>https://mobile.free.fr/account/mes-options/notifications-sms<white>' please, and enable the corresponding option.""",
183184
500: "Error from the server side. Please try again later.",
184185
1: "The SMS has been sent to your mobile ({}).".format(number) if len(numbers) <= 1 else "The SMS has been sent to all your mobile numbers ({}).".format(numbers),
185186
"toolong": "<red>Warning<white>: message is too long (more than <black>{}<white> caracters, so more than 3 SMS).".format(STR_MAX_SIZE)

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# :fr: :phone: FreeSMS.py
22

3-
Un petit script Python 2 ou 3 pour s'envoyer des textos (messages SMS) en ligne de commande, via l'[API de Free](https://mobile.free.fr/moncompte/index.php?page=options&show=20) (uniquement pour un téléphone avec une carte SIM Free).
3+
Un petit script Python 2 ou 3 pour s'envoyer des textos (messages SMS) en ligne de commande, via l'[API de Free](https://mobile.free.fr/account/mes-options/notifications-sms) ([ancien lien](https://mobile.free.fr/moncompte/index.php?page=options&show=20)) (uniquement pour un téléphone avec une carte SIM Free).
44

55
## Exemples
66
### Usage simple
77
1. [Installer ce script](#Installation),
8-
2. Configurer l'API SMS de Free, via [votre espace client](https://mobile.free.fr/moncompte/index.php?page=options&show=20), et noter votre identifiant et clé d'accès à l'API,
8+
2. Configurer l'API SMS de Free, via [votre espace client](https://mobile.free.fr/account/mes-options/notifications-sms), et noter votre identifiant et clé d'accès à l'API,
99
3. Lancer une première fois le script `FreeSMS.py` pour savoir comment stocker ces deux codes,
1010
4. Tester avec un exemple :
1111
```bash
@@ -123,7 +123,7 @@ Python v2.7+ ou Python v3.1+ (version CPython).
123123

124124
### :scroll: Licence ? [![GitHub licence](https://img.shields.io/github/license/Naereen/FreeSMS.py.svg)](https://github.com/Naereen/badges/blob/master/LICENSE)
125125
Ce script et cette documentation sont distribuées en accès libre selon les conditions de la [licence MIT](https://lbesson.mit-license.org/) (cf le fichier [LICENSE](LICENSE) en anglais).
126-
© [Lilian Besson](https://GitHub.com/Naereen), 2017-2018.
126+
© [Lilian Besson](https://GitHub.com/Naereen), 2017-2021.
127127

128128
> Merci à [Thibault Groueix](https://github.com/ThibaultGROUEIX) pour des tests et des commentaires utiles en juillet 2016 et novembre 2017.
129129

0 commit comments

Comments
 (0)