Skip to content

Two-Way Gateway Setup

Step-by-step instructions for configuring webhook URLs in different SMS gateways for two-way messaging.

Available on:

This guide provides step-by-step instructions for configuring webhook URLs in various SMS gateways to enable two-way messaging with the WSMS Two-Way add-on.

Before You Begin

  1. Install and activate the Two-Way SMS add-on
  2. Go to SMS Two Way → Settings (or SMS → Settings → Two Way) to find your webhook URL:
https://yourdomain.com/wp-json/wp-sms-two-way/v1/webhook?wpsms_token=YOUR_TOKEN
  1. Copy this URL—you’ll need it for your gateway configuration

IMPORTANT

Replace yourdomain.com with your actual domain. The wpsms_token is automatically generated and displayed in your settings page.

Gateway Configuration

Twilio

  1. Log in to Twilio Console
  2. Navigate to Phone Numbers → Manage → Active Numbers
  3. Click on your phone number
  4. Scroll to Messaging Configuration
  5. Under A MESSAGE COMES IN, select Webhook
  6. Paste your webhook URL
  7. Set HTTP method to POST
  8. Click Save

Plivo

  1. Log in to Plivo Console
  2. Go to Messaging → Applications
  3. Click Add New Application
  4. Enter application name (e.g., “WSMS Two-Way”)
  5. In Message URL, paste your webhook URL
  6. Set method to POST
  7. Click Create Application
  8. Go to Phone Numbers → Your Numbers
  9. Click on your number
  10. Under Application, select the application you created
  11. Click Update Number

BulkSMS

  1. Log in to BulkSMS
  2. Go to Settings → Advanced → Webhooks
  3. Click Create New Webhook
  4. Enter webhook name (e.g., “WSMS Incoming”)
  5. Paste your webhook URL
  6. Select Inbound Message as trigger
  7. Click Save

ASPSMS

  1. Log in to ASPSMS Console
  2. Go to Numbers → Your Numbers
  3. Click Edit on your number
  4. Find Forward SMS by HTTP GET Request
  5. Paste your webhook URL in the designated field
  6. Click Save

Telnyx

  1. Log in to Telnyx Mission Control
  2. Navigate to Messaging → Programmable Messaging
  3. Click Messaging Profiles
  4. Create a new profile or edit existing
  5. In Inbound Settings, find Inbound Message Webhook URL
  6. Paste your webhook URL
  7. Set method to POST
  8. Click Save
  9. Assign this profile to your phone number

AfricasTalking

  1. Log in to AfricasTalking Dashboard
  2. Go to SMS → SMS Callback URLs
  3. Click Incoming Messages
  4. Paste your webhook URL
  5. Click Save

Octopush

  1. Log in to Octopush
  2. Navigate to API & Integrations
  3. Go to HTTP Callback Options → Webhooks
  4. Find Inbound Messages Callback URL
  5. Paste your webhook URL
  6. Click Save

Mobile Message (Australia)

  1. Log in to Mobile Message
  2. Go to Settings → API
  3. Find Webhook URLs
  4. Paste your webhook URL in Webhook URL for Inbound Messages
  5. Click Save

Gateways Requiring Support Contact

Some gateways require you to contact their support team to configure webhook URLs:

GatewayHow to Configure
SMS.esContact support to set up webhook
InfobipContact support or use API setup
SMSAPIContact support for webhook configuration
CellsyntContact support to enable incoming webhooks
WebSMSContact support for two-way setup

When contacting support, provide:

  • Your account ID/username
  • Your webhook URL: https://yourdomain.com/wp-json/wpsms/v1/webhook/incoming
  • Request: “Please configure this URL to receive incoming SMS messages”

Testing Your Configuration

After configuring your webhook:

  1. Send a test SMS to your gateway number
  2. Check SMS → Inbox for the message
  3. If not received, check the debug log:
/wp-content/uploads/wp-sms-two-way-logs/incoming_requests

Troubleshooting

Messages Not Appearing

  1. Verify webhook URL: Ensure the URL is correct and accessible
  2. Check SSL: Most gateways require HTTPS
  3. Firewall: Ensure your server allows incoming POST requests
  4. Debug log: Check the log file for incoming requests

Webhook Verification Failed

Some gateways verify webhook URLs by sending a test request:

  1. Ensure your site is publicly accessible
  2. Check that the REST API is enabled
  3. Verify no security plugin is blocking the endpoint

SSL Certificate Issues

Gateways require valid SSL certificates:

  1. Ensure your SSL certificate is valid and not expired
  2. Use a certificate from a trusted CA
  3. Avoid self-signed certificates

Webhook Security

To secure your webhook endpoint:

  1. Use HTTPS (required by most gateways)
  2. Consider IP whitelisting if your gateway provides IP ranges
  3. Monitor the debug log for suspicious activity

Last updated: December 29, 2025