Set up SMS Settings ​

ERPNext sends SMS (text messages) through an SMS gateway provider. The provider must offer an HTTP API: a web address that sends an SMS when ERPNext calls it. After the setup, you can send SMS from documents, from the SMS Center, and from notifications.

Prerequisites ​

  • An account with an SMS gateway provider.
  • The provider's HTTP API documentation, with the URL and its parameters.
  • The System Manager role.

Read the gateway URL ​

A provider's API documentation shows a URL like this one:

text
https://sms.example.com/send.php?username=abcd&password=abcd&to=9900XXXXXX&sender=DEMO&message=THIS+IS+A+TEST

This URL sends the message "THIS IS A TEST" from account abcd to the number 9900XXXXXX, with the sender ID DEMO. The URL has three kinds of parts:

PartIn the exampleWhere it goes in ERPNext
The address before the ?https://sms.example.com/send.phpSMS Gateway URL
The parameter for the message textmessageMessage Parameter
The parameter for the mobile numbertoReceiver Parameter
Parameters that never changeusername, password, senderStatic Parameters table

Enter the settings ​

  1. Open SMS Settings.
  2. In SMS Gateway URL, enter the address before the ?.
  3. Enter the Message Parameter and the Receiver Parameter.
  4. In the Static Parameters table, add one row for each fixed parameter, with its value.
  5. If the provider needs a POST request, select Use POST.
  6. Select Save.

To test the setup, open the SMS Center, and send a message to your own number.

Example: Voip.ms ​

  1. In your Voip.ms account, open Main menu > SOAP and REST/JSON API. Turn on the API, set an API password, and allow the IP address of your server.
  2. In DIDs, turn on SMS for the number that sends the messages.
  3. In ERPNext SMS Settings, enter:
    • SMS Gateway URL: https://voip.ms/api/v1/rest.php
    • Message Parameter: message
    • Receiver Parameter: dst
  4. Add these Static Parameters:
    • api_username: your Voip.ms account username.
    • api_password: the API password.
    • method: sendSMS.
    • did: the 10-digit number that sends the SMS.