Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
blocks:app-note:sms42elks [2025-05-22 07:57] mattias [Send texts to mobile] |
blocks:app-note:sms42elks [2025-05-30 08:43] (current) admin |
||
---|---|---|---|
Line 1: | Line 1: | ||
=====Send texts to mobile===== | =====Send texts to mobile===== | ||
- | ===== Installation ===== | + | This application note describes a way to send text messages (SMS) from blocks via a SMS gateway service. It can serve as a boilerplate for anyone that wants to develop a similar script for some other SMS gateway service, or simply just needs the functionality and is happy to use the https:// |
+ | ===== Installation ===== | ||
You need a computer with a running blocks server with internet access and a web browser to test this application note. | You need a computer with a running blocks server with internet access and a web browser to test this application note. | ||
- | |||
We have prepared a PIXILAB-blocks-root folder containing everything you need to run the example. | We have prepared a PIXILAB-blocks-root folder containing everything you need to run the example. | ||
- | {{ : | + | {{ : |
- | + | ====Getting | |
- | If you do not know how to do this, read the instructions in the [[blocks: | + | |
- | + | ||
- | ====Get your credentials==== | + | |
Goto [[https:// | Goto [[https:// | ||
- | ====Configure | + | ====Configuring |
- | Before we can send a text we must set out credentials. They can be set as properties from a task. THis must be done before attempting to send texts. | + | Before we can send a text we must apply our credentials |
+ | |||
{{: | {{: | ||
- | In production environment one may rather | + | |
- | The credentials must be stores in JSON format | + | In production environment one may instead |
< | < | ||
{ | { | ||
Line 30: | Line 29: | ||
====Send a text message from a task==== | ====Send a text message from a task==== | ||
- | Use a task to send out the message, the phone number must be complete with countrycode like in the example. | + | Use a task to send a message, the phone number must include |
{{: | {{: | ||
+ | Aternatively, | ||
+ | |||
+ | ====Result==== | ||
+ | A text message should be received. | ||
+ | {{: | ||
+ | If not, check your log file for any error messages related to the SMS service, such as incorrect credentials. |