Jluc
Juillet 15, 2026, 8:41
1
Description
L’envoi de SMS est très pratique mais il n’est possible aujourd’hui de ne paramétrer qu’un seul numéro. Afin de partager les notifications, serait-il possible d’ajouter une clé pour un second numéro free ?
mutmut
Juillet 15, 2026, 4:48
2
J’ajouterai que chaque clé API devrait appartenir à un compte utilisateur, ce qui permet d’envoyer un message à Monsieur ou Madame.
Cette fonctionnalité était déjà ma liste de TODO car on en avais parlé quand j’avais fait cette intégration
J’ai un peu travaillé dessus:
Je ferais un essai ce week-end et mettrais une image à dispo pour test
C’est bon, chaque utilisateur peut maintenant mettre sa propre clé API Free.
J’ai aussi ajouté dans la liste des utilisateurs le choix de faire le message à tout le monde
Je vais préparer une image si quelqu’un veut tester
La PR
master ← William-De71:feat/sms-free-multiuser
ouvert 09:06PM - 17 Jul 26 UTC
### Pull Request check-list
- [x] If your changes affect the code, did you wr… ite the tests?
- [x] Are server tests passing with coverage? (`cd server && npm run coverage`) — Codecov requires **100% coverage on lines changed in this PR**
- [ ] Did Cypress E2E tests pass? (`npm run cypress:run` from repo root, if UI changed)
- [x] Is the linter passing? (`npm run eslint` on both front/server)
- [x] Did you run prettier? (`npm run prettier` on both front/server)
- [ ] If you are adding a new feature/service, did you run the integration comparator? (`npm run compare-translations` on front)
- [x] Did you test this pull request in real life? With real devices?
- [ ] If your changes modify the API (REST or Node.js), did you modify the API documentation?
- [ ] If you are adding a new features/services which needs explanation, did you modify the user documentation?
- [x] Did you add fake requests data for the demo mode? (N/A — no new widget)
### Description of change
This PR adds **multi-user support to the Free Mobile integration**.
#### Problem
Until now, only the **admin** account could configure a Free Mobile API key. The customer ID and access token were stored as **global** service variables, so Gladys could only send SMS to that single account. There was no way to send an SMS to another user, nor to build scenes targeting a specific user.
#### Solution
Free Mobile is now aligned with the **Telegram / CallMeBot** pattern:
- **Per-user configuration**: the `FREE_MOBILE_USERNAME` and `FREE_MOBILE_ACCESS_TOKEN` variables are now stored per-user (`userRelated: true`). Each user can enter their own credentials from the integration page to receive SMS.
- **Automatic migration**: on service start, the legacy global configuration (if any) is migrated to the **admin** user's per-user configuration, then the old global variables are removed. Existing installations keep working with no manual action.
- **New message handler**: a `message.send(userId, message)` handler reads the user's own credentials on the fly and sends the SMS.
- **Scene action**: the "Send an SMS" action now has a **recipient selector** — you can send to a specific user, or to **all users** who configured Free Mobile.
et l’image en cours de build:
docker pull willde71/gladys-test:freemobile
Jluc
Juillet 17, 2026, 9:19
7
Super, un grand merci @Will_71 . Il ne me restera plus qu’à réussir à paramétrer un second utilisateur