How to forward SMS to a custom Webhook?
Send SMS data to any HTTP endpoint (API, Zapier, Make, etc.)
For developers and power users, Webhooks offer ultimate flexibility. You can POST your SMS data to any URL, allowing integration with Zapier, Make (Integromat), or your own custom backend.
Prepare Your Endpoint
Prepare Your Endpoint
First, make sure you have an HTTP endpoint ready to receive SMS data. Your endpoint should be able to accept POST, GET, or PUT requests.
https://api.yourservice.com/sms/webhook
Add Webhook Destination
Add Webhook Destination
Open SMS Forwarder and tap + to add a new destination. Select Webhook from the list.
Enter Webhook URL
Enter Webhook URL
Paste your endpoint URL. Make sure it starts with http:// or https://.
https://your-server.com/api/sms
Select HTTP Method
Select HTTP Method
Choose the HTTP method your endpoint expects:
- POST: Send data in request body (most common)
- GET: Send data as URL query parameters
- PUT: Update existing resource
Configure Body Key
Configure Body Key
For POST/PUT requests, specify the JSON key for the message content. For GET requests, this will be the query parameter name.
message
Add Custom Headers (Optional)
Add Custom Headers (Optional)
If your endpoint requires authentication or custom headers, tap Custom Headers and add them as key-value pairs.
Authorization: Bearer your-api-key
Test Your Webhook
Test Your Webhook
Tap Send test message to verify your endpoint receives the data correctly. Check your server logs to confirm.
Request Format
Here's what SMS Forwarder sends to your webhook:
POST Request Body (JSON)
{
"message": "Your verification code is 123456",
"sender": "+1234567890",
"contact": "Bank of America",
"timestamp": "2024-01-15T10:30:00Z"
}
- message: The SMS content
- sender: Phone number that sent the SMS
- contact: Contact name if available, otherwise same as sender
- timestamp: When the message was forwarded (ISO 8601 format)
Troubleshooting
Getting connection errors
Verify your endpoint URL is correct and publicly accessible. Check that your server is running and not blocked by firewall rules.
Authentication failing
Double-check your authorization header. Make sure the API key or token is correct and hasn't expired.
Data not in expected format
SMS Forwarder sends JSON data. Make sure your endpoint can parse JSON and is looking for the correct field names.
HTTPS certificate errors
Your server must have a valid SSL certificate. Self-signed certificates are not supported. Consider using Let's Encrypt for free certificates.
Timeout errors
Your endpoint should respond within 30 seconds. If processing takes longer, return a quick 200 response and process the data asynchronously.
Rate limiting on your endpoint
If you're receiving many SMS messages, implement queuing on your server side. Consider using filters to reduce the volume of forwarded messages.