Configuration Examples
Popular SMS provider configurations including Twilio, MessageBird, Nexmo, and custom providers with detailed setup examples and best practices.
Before You Start
These configuration examples are templates that you can adapt for your specific SMS provider. Replace placeholder values with your actual API credentials and endpoints. Always test configurations in a development environment before using in production.
Configuration Examples
This page provides detailed configuration examples for popular SMS providers and custom setups. Use these templates as a starting point for your SMS integration.
Popular SMS Providers
Twilio Configuration
Twilio SMS Configuration
Method: POST
API Endpoint:
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Messages.jsonData Format: JSON
Headers:
Authorization: Basic {Base64EncodedCredentials}Content-Type: application/json
Body Parameters:
To: $phone_number$From: YOUR_TWILIO_NUMBERBody: $message$
Notes:
- • Replace {AccountSid} with your Twilio Account SID
- • Base64 encode your Account SID and Auth Token
- • Use a verified Twilio phone number for the From field
MessageBird Configuration
MessageBird SMS Configuration
Method: POST
API Endpoint:
https://rest.messagebird.com/messagesData Format: JSON
Headers:
Authorization: AccessKey YOUR_ACCESS_KEYContent-Type: application/json
Body Parameters:
recipients: $phone_number$originator: YOUR_SENDER_NAMEbody: $message$
Notes:
- • Replace YOUR_ACCESS_KEY with your MessageBird access key
- • Originator can be a phone number or alphanumeric string
- • Supports multiple recipients in a single request
Nexmo/Vonage Configuration
Nexmo/Vonage SMS Configuration
Method: POST
API Endpoint:
https://rest.nexmo.com/sms/jsonData Format: JSON
Headers:
Content-Type: application/json
Body Parameters:
api_key: YOUR_API_KEYapi_secret: YOUR_API_SECRETto: $phone_number$from: YOUR_SENDER_NAMEtext: $message$
Notes:
- • Replace YOUR_API_KEY and YOUR_API_SECRET with your Nexmo credentials
- • From field can be a phone number or alphanumeric string
- • Supports delivery receipts and status updates
Custom Provider Setup
Generic HTTP API (GET Method)
Simple GET Method Configuration
Method: GET
API Endpoint:
https://your-sms-provider.com/send?phone=$phone_number$&message=$message$&api_key=YOUR_API_KEYHeaders:
User-Agent: YourApp/1.0
Notes:
- • Simple URL-based parameter passing
- • No request body required
- • Suitable for basic SMS gateways
Custom POST API
Advanced POST Method Configuration
Method: POST
API Endpoint:
https://your-sms-provider.com/api/v1/sendData Format: JSON
Headers:
Authorization: Bearer YOUR_API_TOKENContent-Type: application/json
Body Parameters:
recipient: $phone_number$content: $message$sender_id: YOUR_SENDER_ID
Notes:
- • Bearer token authentication
- • JSON payload for complex data
- • Custom parameter names
Advanced Configuration Examples
Form Data Configuration
Form-Encoded Data Configuration
Method: POST
API Endpoint:
https://sms-provider.com/api/sendData Format: Form Data
Headers:
Content-Type: application/x-www-form-urlencodedAuthorization: Basic {Base64Credentials}
Body Parameters:
mobile: $phone_number$text: $message$sender: COMPANY_NAME
Custom Authentication
Custom Authentication Configuration
Method: POST
API Endpoint:
https://api.sms-provider.com/v2/sendData Format: JSON
Headers:
X-API-Key: YOUR_API_KEYX-Secret: YOUR_SECRET_KEYContent-Type: application/json
Body Parameters:
destination: $phone_number$message: $message$priority: high
Configuration Best Practices
Security Best Practices
- Secure Storage: Store API keys and credentials securely
- Environment Variables: Use environment variables for sensitive data
- Regular Updates: Keep SMS provider credentials updated
- Backup Configuration: Maintain backup configurations
Testing Best Practices
- Test Configuration: Test SMS settings before production use
- Provider Testing: Verify SMS provider integration
- Message Testing: Test SMS message delivery
- Error Testing: Test error handling scenarios
Performance Best Practices
- Queue Management: Optimize SMS queue processing
- Rate Limiting: Implement appropriate rate limiting
- Error Handling: Robust error handling and retry logic
- Monitoring: Monitor SMS delivery performance
Configuration Checklist
- ✓ Choose appropriate HTTP method (GET/POST)
- ✓ Configure correct API endpoint URL
- ✓ Set up proper authentication headers
- ✓ Configure body parameters for POST requests
- ✓ Test SMS functionality in development
- ✓ Monitor SMS delivery and costs
- ✓ Set up error handling and logging
- ✓ Configure backup SMS providers