Tweaking for the sms gateway

I could not manage sending a SMS via SMS Center. The htmi api works as below:{Username:username,Password:pass}&Header={From:name,ValidityPeriod:1444}&Message=content&To=[90xxxxxxxxx]&DataCoding=Default

This is my setting panel.

No logs shows up . Hence, do not know what I do wrongly.

Params you set are directly URLencoded whereas api requires them to be json objects. Try these

  • Parameter: Credential Value: {Username:username,Password:pass}
  • Parameter: Header Value: {From:name,ValidityPeriod:1444}
  • Parameter: DataCoding Value: Default

Message param & Receiver Params are set correctly.

1 Like

@ferohers I think @BhupeshGupta’s suggestion should work.

1 Like

It worked!

Thank you very much. I will write an article about it :slight_smile:


I am having similar issues to you getting the SMS Centre to work with my SMS gateway API.
How did you manage to POST your SMS settings in Json format?

My SMS gateway requires:
That my data must be in application/json format using POST method to send.
The parameters that I require to be sent are:
SMS Gateway URL**my_auth_id_goes_here_for_the_api**/Message/
auth_id = “1234567890” # My AUTH ID
auth_token = “1234567890” # My AUTH TOKEN
And finally the SMS data
src: ‘+61411222333’, # Sender’s phone number with country code
dst : ‘+61???’, # Receiver’s phone number with country code
text : “Hello, how are you?”, # My SMS Text Message

In an ideal world I would like use some of the SMS status returned via GET

`url` : "http://", # The URL to which with the status of the message is sent
`method` : 'GET' # The method used to call the status url

Any help would be great.


Just answered you via pm.

The fastest way you can setup your sms account is to ask your provider html code to send the message.

if we see the full code, we can help further.

Hi Guys

So i can receive sms’s when i configure as as show in the picture by setting msisdn value to my number. but i want that to be a variable that erpnext will convert to the customer’s number.

i use urllib# Please see the FAQ regarding HTTPS (port 443) and HTTP (port -

what variable do i put in there?

hi @Johannes_Maepa, has this worked for you?
I have also tried to set up my sms setting with bulksms, but I am always having errors.
I have posted my issue here.

I even gave up on it for now

Thank you BhupeshGupta you suggestions really worked for my SMS gateway

I know its late, but maybe this will help.

You need to remove msisdn from right and side table and add it to left side field Receiver Parameter.

Your Receiver Parameter value should be msisdn instead of number and msisdn should not exist in the table on right.

1 Like


I would suggest you to check out SMS platform they have their API available for free and also have a detailed explanation on how to use it. They also have a great support team who can help you out if you have any problems.

I am posting the settings for anyone who is try to setup with textlocal
Once you convert to transnational account you can send Sender parameter add it below api key

1 Like

Does this still work for you? Its not working for me. I am try to use SMS for 2 factor authentication, but no SMS are being sent.

Can anyone suggest a functional SMS gateway which works with ERPNext SMS system? If textlocal works, can someone share working settings please. Textlocal gives 10 SMS for free so one can check their system.

I recommend MSG91. Textlocal should work too.
You must use v1 API though.


This is the textlocal setting that worked for me. I got it from their helpline.

The API is very well documented:


It requires HTTP Authentication, setting content headers, and POSTing as json data. I don’t see any way that ERPNext allows customizing this in the SMS Settings, so I am also unable to use this feature. How can HTTP Authentication, and custom content headers not be supported?

I will get this error when trying to send:

This is an example of a proper request with curl:

EDIT: I figured out how to do this. After looking at the source I could see that it should be possible: frappe/frappe/core/doctype/sms_settings/ at 06d93858298bd5583dfa288ddfcea2ba280fbcc3 · frappe/frappe · GitHub

The “static parameters” box in the SMS Settings was too narrow, so the “Headers” column wasn’t visible to me. The other issue is that you must encode your authentication credentials by hand. The easiest way to do this is to open up your browsers console and enter window.btoa("<AUTH_ID:AUTH_TOKEN>") (including quotes), and then copy the result (excluding quotes) so that you have “Authentication: Basic <BTOA ENCODED AUTH>

Your configuration should look like this:

  • SMS gateway url:[REDACTED]/Message/
  • Message parameter: text
  • Receiver parameter: dst

Static parameters:

  • Authorization: Basic <BTOA ENCODED AUTH> (“Header” column checked)
  • Content-Type: application/json (“Header” column checked)
  • src: <E.164 format phone number (“Header” column not checked)

“Use POST” option should be checked.

1 Like