Mobile Configuration in 2.34.3

In 2.31.9, when configuring the SMS gateway the following parameters were available: Message Parameter=content and Recipient Parameter=to_number. In 2.34.3 to the latest version of DHIS2 doesn’t have those parameters. Please what is the way of configuring SMS gateway on 2.34.3? Because it is saying sent but I am not receiving the SMS on my phone. I am getting this error on the SMS gateway log:

“message”: {
“status”: “error”,
“error”: {
“name”: “SyntaxError”,
“message”: “Unexpected end of JSON input”,
“code”: 422
“level”: “error”,
“label”: “sms-gateway-prod”,
“timestamp”: “2021-04-04T22:08:40.072Z”

the latest version of the SMS gateway is buggy, it doesn’t work as it was working in 2.33 and expected.

please configured it as it’s in the above image.

Hi @mujtabaomar ,

Thanks for your quick response but can you be more explicit? Because the content of the

Url and the Configuration template

are hidden by the red ligne in your image

HI @Isidoreadje,

URL template includes the gateway but the rest of the parameters should be included in the configuration template, in the previous version there was the message parameter here you have to encode that like (message=${text}) and receiver=${recipients}. here is the link for the API SMS configuration.

Okay Thanks @mujtabaomar

Please all secret information were not shared and I had already tried it in so many ways nothing is working for me:

URL Template: https://a8765b3c33e5/messages/send
configuration Template: content=${text}&to_number=${recipients}&provider=rapidpro&secret=${secret}
contentType: application/x-www-form-urlencoded
sendUrlParameter: (checked)

And I am getting this error on the SMS gateway logs:

"message": {
    "status": "error",
    "error": {
        "name": "SyntaxError",
        "message": "Unexpected token c in JSON at position 0",
        "code": 422
"level": "error",
"label": "sms-gateway-prod",
"timestamp": "2021-04-07T20:53:23.467Z"

Hi @Gerald_Thomas,

embed the parameters in Configuration template like provider you did.
configuration Template: content=${text}&to_number=${recipients}&provider=rapidpro&secret=secret

don’t include any key-value pair as a parameter embed them in the query string.

Hi Majtaba,
I already did as you suggested:
configuration Template: content=${text}&to_number=${recipients}&provider=rapidpro&secret=secret but the SMS is still FAILED. On the SMS gateway I

am receiving this error message:

** “message”: {**
** “status”: “error”,**
** “error”: {**
** “name”: “SyntaxError”,**
** “message”: “Unexpected token c in JSON at position 0”,**
** “code”: 422**
** }**
** },**
** “level”: “error”,**
** “label”: “sms-gateway-prod”,**
** “timestamp”: “2021-04-08T04:38:35.986Z”**

Did you put whatever is expected in the provider=providerExpectedName and secret=whateverIsTheSecret. are you able to check what hits their server like what parameters are missing.

Dear Mujtaba,
I change the secret to my secret. I can’t see any parameter on the SMS server; it only send out an information about json which was attached on the previous message and DHIS2 under view send message it FAILED

Finally, find the solution for 2.34.3
Gateway Name: ANY_NAME
URL Template: https://SMS_GATEWAY_LINK?content={text}&to_number={recipients}&provider=provider_name&secret=XXXXXX
configurationTemplate: This should be blank
contentType: text/plain

useGet: (checked)
sendUrlParameters: (checked)

On 2.34.4
Gateway Name: ANY_NAME
URL Template: https://SMS_GATEWAY_LINK
configurationTemplate: content=${text}&to_number=${recipients}&provider=provider_name&secret=XXXXXX
contentType: text/plain

useGet: (checked)
sendUrlParameters: (checked)