Send & receive SMS
Membrane includes an sms
program (pre-installed in your workspace) for sending
and receiving text messages programmatically.
::: note
You can only configure one phone number at the moment (to send texts to yourself), but we plan to remove that limitation. Send us a note if that’s something you’d like asap, and/or upvote it on our roadmap.
:::
Configure
To configure your sms
program, find it in the Navigator, click the configure
action, type in your phone number, and hit “Invoke”.
Send
To send yourself a text manually, click on the sms
program in the Navigator,
click the send
action, type in a message
, and hit “Invoke”. Check your
phone! (And Membrane Logs 👀).
To send yourself a text programmatically, add the sms
program as a
connection to any program and call:
Receive
Try responding to the text you sent yourself above, and check the sms
Logs for
your text.
When sms
receives a text, it fires a received
event that other Membrane
programs can subscribe to. We created an
sms-subscriber
program as a minimal example of how to do this.