GitHubContribute in GitHub: Edit online

copyright: years: 2017, 2018 lastupdated: "2018-07-02"


Configure authentication for the SMS provider webhook

When you configure the SMS provider webhook to forward SMS messages to SMS Gateway, you can provide a URL for either an unsecured or secured connection:

  • Unsecured connection: http://<host-address:unsecured-port>/sms.receiver/SmsRecv
  • Secured connection: https://<host-address:secured-port>/sms.receiver/SmsRecv

For additional security, you can configure HTTP Basic authentication for the webhook in the SMS Gateway configuration.

  1. Specify a user name and password for the webhook.

    • Single-tenant environment: In the SMS Gateway configuration, specify the SMS_WEBHOOK_USERNAME and SMS_WEBHOOK_PASSWORD environment variables.

      For example, on Docker:

       - SMS_WEBHOOK_USERNAME=myUserName
       - SMS_WEBHOOK_PASSWORD=p4ssw0rd
      
    • Multi-tenant JSON configuration: In your tenant configuration JSON file, configure a webHookCredentials object with username and password properties.

    "tenants": [
       {
        "tenantPhoneNumber": "+12345556789",
        "description": "Number for accessing account information",
        ...
        "webHookCredentials": {
          "username": "myUserName",
          "password": "p4ssw0rd"
        }
        ...
       }
    ]
    
  2. In the console for your SMS provider, configure the webhook for the tenant by adding the user name and password to the URL in the following format: https://<user:password>@<host address:secure port>/sms.receiver/SmsRecv

    For example:

    https://myUserName:p4ssw0rd@123.4.5.67:9443/sms.receiver/SmsRecv