How to Setup Generic SMS Gateway

Hi All,

I am trying to configure a generic sms gateway using a local provider, at the moment, I just need to set up for outbound sms. I have looked at similar posts here as well as the documentation. but for some reason, I am not able to get it working.

The provider documentation url is as below (working fine in post man)
https://url/api/v2.1/action/send/api_key/api_key/contacts/contacts/senderId/sender_id/message/message

where:
contacts is the number(s) to send the sms, 26095000xxxx or [‘26096xxxxxxx’,’26097xxxxxxx’]
sender_id is a text string configured on their platform, basically the name the msg appears to be from
message is the actual sms being sent

so I changed a few parameters like below

https://url/api/v2.1/action/send/api_key/{api_key}/contacts/**{recipient}**/senderId/**{senderId}**/message/**{message}**

Url template: https://url/api/v2.1/action/send
Configuration template: /api_key/{api_key}/contacts/{recipient}/senderId/{senderId}/message/{message}

Then I added api_key and senderId under key value pairs.

However when I try to via post via the api like /sms/outbound?message=text&recipient=26097xxxxxxx
I am getting error 500, Internal Server Error.

Where am I messing up.

Will greately appreciate your help.

DHIS2 version: 2.39.2.1

Hi @iammash

Since it responds with a server error, would you please share the complete Catalina.out logs (without authentication/sensitive info)?

Thanks!

@Gassim thanks. I don’t have access to Calalina logs on the server i was trying this on. Let me set up a local instance and then I will share.

1 Like