FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14124 questions

16781 answers

27569 comments

53950 members

0 votes
133 views 0 comments
by
Hi

I got a RUT950 with the latest FW.

Is it possible to also send e HTTP Header with the request?

I want to use it to redirect SMS to a Threema Group Chat, but that needs the API Key in the header.

The use case is to redirect all received sms to a threema group chat. To use the Threema API I have to send POST request like this:

curl -X POST -H 'X-Api-Key: AAAABBBBBCCCCCCDDDDDEEEEEE' -d '{"type": "text", "body": "THE MESSAGE"}' 'https://broadcast.threema.ch/api/v1/identities/BCID/groups/GROUPID/chat'

Regards

1 Answer

0 votes
by
Hi,

Unfortunately, the SMS gateway "SMS FORWARDING TO HTTP" feature does not allow adding the requested header. However, you could try to write a custom script that reads and filters (if needed) the incoming messages and send the required POST request to the API.

To develop the script, you may find helpful the following information in the links below:

GSMCTL commands:

https://wiki.teltonika-networks.com/view/Gsmctl_commands#SMS_management_options

Crontabs:

https://wiki.teltonika-networks.com/view/Crontabs

I hope you find this information helpful in solving your query.

Regards.