Two-Way Gateway Setup
Step-by-step instructions for configuring webhook URLs in different SMS gateways for two-way messaging.
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
- Install and activate the Two-Way SMS add-on
- Go to WSMS → Two-Way SMS → Settings and find the Webhook URL box under Gateway Connection:
https://yourdomain.com/wp-json/wp-sms-two-way/v1/webhook?wpsms_token=YOUR_TOKEN
- Copy this URL with the copy button next to it. You will 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.
NOTE
From Two-Way SMS 1.6.3, the token is also accepted as a path segment instead of a query string:
https://yourdomain.com/wp-json/wp-sms-two-way/v1/webhook/YOUR_TOKEN
Both forms work the same way. Reach for the path form when your provider drops the ?wpsms_token=... query string from the URL you save in their panel. When that happens every incoming message fails the token check and never reaches your inbox, with nothing on screen to explain why.
Gateway Configuration
Twilio
- Log in to Twilio Console
- Navigate to Phone Numbers → Manage → Active Numbers
- Click on your phone number
- Scroll to Messaging Configuration
- Under A MESSAGE COMES IN, select Webhook
- Paste your webhook URL
- Set HTTP method to POST
- Click Save
Plivo
- Log in to Plivo Console
- Go to Messaging → Applications
- Click Add New Application
- Enter application name (e.g., “WSMS Two-Way”)
- In Message URL, paste your webhook URL
- Set method to POST
- Click Create Application
- Go to Phone Numbers → Your Numbers
- Click on your number
- Under Application, select the application you created
- Click Update Number
BulkSMS
- Log in to BulkSMS
- Go to Settings → Advanced → Webhooks
- Click Create New Webhook
- Enter webhook name (e.g., “WSMS Incoming”)
- Paste your webhook URL
- Select Inbound Message as trigger
- Click Save
ASPSMS
- Log in to ASPSMS Console
- Go to Numbers → Your Numbers
- Click Edit on your number
- Find Forward SMS by HTTP GET Request
- Paste your webhook URL in the designated field
- Click Save
Telnyx
- Log in to Telnyx Mission Control
- Navigate to Messaging → Programmable Messaging
- Click Messaging Profiles
- Create a new profile or edit existing
- In Inbound Settings, find Inbound Message Webhook URL
- Paste your webhook URL
- Set method to POST
- Click Save
- Assign this profile to your phone number
AfricasTalking
- Log in to AfricasTalking Dashboard
- Go to SMS → SMS Callback URLs
- Click Incoming Messages
- Paste your webhook URL
- Click Save
Octopush
- Log in to Octopush
- Navigate to API & Integrations
- Go to HTTP Callback Options → Webhooks
- Find Inbound Messages Callback URL
- Paste your webhook URL
- Click Save
Mobile Message (Australia)
- Log in to Mobile Message
- Go to Settings → API
- Find Webhook URLs
- Paste your webhook URL in Webhook URL for Inbound Messages
- Click Save
Gateways Requiring Support Contact
Some gateways require you to contact their support team to configure webhook URLs:
| Gateway | How to Configure |
|---|---|
| SMS.es | Contact support to set up webhook |
| Infobip | Contact support or use API setup |
| SMSAPI | Contact support for webhook configuration |
| Cellsynt | Contact support to enable incoming webhooks |
| WebSMS | Contact support for two-way setup |
When contacting support, provide:
- Your account ID/username
- Your webhook URL, copied from your own settings page as described in Before You Begin. It already contains your unique
wpsms_token, so send it exactly as shown, and do not post it publicly. - Request: “Please configure this URL to receive incoming SMS messages”
Testing Your Configuration
After configuring your webhook:
- Send a test SMS to your gateway number
- Check WSMS → Two-Way SMS → Inbox for the message
- If not received, check the debug log:
/wp-content/uploads/wp-sms-two-way-logs/incoming_requests
Troubleshooting
Messages Not Appearing
- Verify webhook URL: Ensure the URL is correct and accessible
- Check SSL: Most gateways require HTTPS
- Firewall: Ensure your server allows incoming POST requests
- Debug log: Check the log file for incoming requests
Webhook Verification Failed
Some gateways verify webhook URLs by sending a test request:
- Ensure your site is publicly accessible
- Check that the REST API is enabled
- Verify no security plugin is blocking the endpoint
SSL Certificate Issues
Gateways require valid SSL certificates:
- Ensure your SSL certificate is valid and not expired
- Use a certificate from a trusted CA
- Avoid self-signed certificates
Webhook Security
To secure your webhook endpoint:
- Use HTTPS (required by most gateways)
- Consider IP whitelisting if your gateway provides IP ranges
- Monitor the debug log for suspicious activity
Related
- Two-Way SMS - Main add-on documentation
- Webhooks - General webhook configuration
- Gateway Settings - Configure SMS gateways
Last updated: December 29, 2025