46elks sms text Sigfox callback

Send SMS / text message directly from Sigfox backend using 46elks

Sigfox backend has built-in functionality for sending email, but sometimes email isn’t convenient and you’d like to send Sigfox messages directly to a phone using SMS / text.

Thanks to 46elks and their wonderful API, sending SMS / text messages can be done with a very simple callback.

The URL pattern is 46elks‘ API endpoint, https://api.46elks.com/a1/SMS
HTTP method is POST and make sure “Send SNI” is checked.

Authorization header

46elks uses basic auth to prevent others from using your account. You can find your username and password in the “API credentials” section in your account.

To generate the authorization header, you can use an online tool like this, or use a terminal window and run the following command:

echo -n 'u092...a70e:0439...9577'| base64

where u092…a70e is the username and 0439…9577 is the password. Type “Authorization” in the first header field, and the contents generated above as value.

Payload

The payload needs three parameters:

  • “from” is the phone number / text id that the message should appear coming from. I’ve selected to use the text “SF” prepended to the Sigfox device id.
  • “to” is the phone number that the sms should be sent to.
  • “message” is the contents of the message. I selected to just display the text “Data:” followed by the raw data from the device.

Save the callback and trigger a message from your device. You should get a message that looks similar to this:

Cost

Each outgoing message costs 0.038EUR. For full details, see 46elks’ price list.

2 thoughts on “Send SMS / text message directly from Sigfox backend using 46elks

  1. Hello,
    Could you help me?
    I would like to do the same thing with a voice call.
    Thank you in advance.

    Regards

Leave a Reply

Your email address will not be published. Required fields are marked *