Provider Authentication
Connect your SMS provider account to enable sending and receiving text messages through your Cloud-PBX system.
Overview
SMS Authentication connects your Cloud-PBX to external SMS providers (Twilio, Vonage, etc.) using API credentials. This allows your system to send and receive SMS messages through the provider's network.
What You'll Need:
- SMS provider account (Twilio, Vonage, Bandwidth, Plivo, or MessageBird)
- API credentials (Account SID, Auth Token, API Key)
- SMS-enabled phone number from provider
- Webhook URL access for inbound messages
Authentication Flow:
- Create account with SMS provider
- Obtain API credentials
- Purchase/provision SMS phone number
- Configure authentication in Cloud-PBX
- Set up webhooks for inbound messages
- Test sending and receiving
Supported Providers
Twilio Setup
Why Twilio:
- Most popular SMS provider
- Excellent global coverage
- Comprehensive API documentation
- Reliable delivery
- Strong developer support
Required Credentials:
- Account SID
- Auth Token
- Phone Number(s)
Pricing (approximate):
- Long code: $1/month + $0.0075/message (US)
- Toll-free: $2/month + $0.0125/message
- Short code: $1000/month + $0.005/message
- MMS: $0.02/message
Getting Started:
- Sign up at twilio.com/try-twilio/sms
- Navigate to Console Dashboard
- Note your Account SID and Auth Token
- Purchase phone number in Phone Numbers section
- Configure webhook for incoming messages
Vonage (Nexmo) Setup
Why Vonage:
- Good international coverage
- Competitive pricing
- Virtual numbers in 100+ countries
- Vonage Verify for 2FA
Required Credentials:
- API Key
- API Secret
- Virtual Number(s)
Pricing (approximate):
- Virtual number: $0.90-3/month
- SMS: $0.0052-0.01/message (varies by country)
- MMS: $0.04-0.12/message
Getting Started:
- Sign up at vonage.com
- Go to API Settings in dashboard
- Note your API Key and API Secret
- Purchase virtual number
- Configure webhook URL
Bandwidth Setup
Why Bandwidth:
- US/Canada focused
- Competitive pricing
- High-quality voice and messaging
- Direct carrier network
Required Credentials:
- Account ID
- Username
- Password
- Application ID
- Phone Number(s)
Pricing (approximate):
- Phone number: $1/month
- SMS: $0.004/message (US/Canada)
- MMS: $0.012/message
Getting Started:
- Sign up at bandwidth.com
- Navigate to API Credentials
- Create application for messaging
- Note credentials and Application ID
- Order phone numbers
- Set webhook URL
Plivo Setup
Why Plivo:
- Good for high volume
- Competitive pricing
- Global SMS coverage
- Easy API integration
Required Credentials:
- Auth ID
- Auth Token
- Phone Number(s)
Pricing (approximate):
- Phone number: $0.80/month
- SMS: $0.0035-0.01/message
- Powerpack for high volume
Getting Started:
- Sign up at plivo.com
- Go to Account Overview
- Note your Auth ID and Auth Token
- Buy phone numbers
- Create Powerpack (optional, for high volume)
- Configure message URL
MessageBird Setup
Why MessageBird:
- Strong European presence
- Omnichannel platform (SMS, WhatsApp, Voice)
- Good for international businesses
- Unified API
Required Credentials:
- API Key
- Phone Number(s)
Pricing (approximate):
- Virtual number: €1/month
- SMS: €0.0065-0.04/message (varies)
- Conversations API available
Getting Started:
- Sign up at messagebird.com
- Go to Developers → API Keys
- Create Live API Key
- Purchase phone numbers
- Configure webhook
Configuration Steps
Create Provider Account
Choose your SMS provider and create an account:
Selection Criteria:
- Geographic Coverage: Ensure provider supports your regions
- Pricing: Compare per-message costs
- Volume: High-volume vs low-volume pricing
- Features: MMS, short codes, international
- Reliability: Check provider status/uptime history
Trial Accounts:
- Most providers offer free trials
- Test functionality before committing
- Limited credits for testing
- Upgrade to production account when ready
Obtain API Credentials
Locate and copy your API credentials from provider dashboard:
- Log in to Twilio Console
- Dashboard shows Account SID and Auth Token
- Click "Show" to reveal Auth Token
- Copy both values
Keep Credentials Secret
Never share Auth Token publicly or commit to version control.
- Log in to Vonage Dashboard
- Navigate to API Settings
- Find API Key and API Secret
- Copy both values
- Optionally create multiple API keys for different environments
- Log in to Bandwidth Dashboard
- Go to Account → API Information
- Note Account ID, Username, Password
- Create Messaging Application
- Copy Application ID
- Log in to Plivo Console
- Account Overview shows Auth ID
- Click to reveal Auth Token
- Copy both values
- Create Powerpack if needed
- Log in to MessageBird Dashboard
- Go to Developers → API Keys
- Click Add API Key
- Name: "Cloud-PBX Production"
- Copy the generated key (shown once!)
Purchase Phone Number
Obtain SMS-enabled phone number from provider:
Number Selection:
- Local Numbers: Best for regional business (+1-555-123-4567)
- Toll-Free: Professional image, nationwide reach (800, 888, etc.)
- Short Code: High-volume campaigns (5-6 digits)
Capabilities Required:
- ✅ SMS Enabled: For text messaging
- ✅ MMS Enabled: If sending images (optional)
- ✅ Voice: If also used for calls (optional)
Purchase Process:
1. Go to "Phone Numbers" section
2. Click "Buy a Number"
3. Select country/region
4. Filter by SMS capability
5. Choose number
6. Complete purchase
7. Note phone number (with country code: +15551234567)Number Format
Always store numbers in E.164 format: +[country code][number] Example: +15551234567 (not 555-123-4567)
Configure Cloud-PBX Authentication
Enter provider credentials in your Cloud-PBX admin panel:
- Navigate to Messaging → SMS → Authentication
- Select your SMS Provider from dropdown
- Enter API Credentials:
- Twilio: Account SID, Auth Token
- Vonage: API Key, API Secret
- Bandwidth: Account ID, Username, Password, Application ID
- Plivo: Auth ID, Auth Token
- MessageBird: API Key
- Enter Phone Number(s) in E.164 format (+15551234567)
- Click Test Connection to verify
- Click Save Configuration
Example Configuration:
Provider: Twilio
Account SID: AC1234567890abcdef1234567890abcdef
Auth Token: ••••••••••••••••••••••••••••••••
Phone Numbers: +15551234567, +15559876543
Status: ✅ ConnectedConnection Successful
If test passes, your Cloud-PBX can now send SMS messages!
Set Up Inbound Webhooks
Configure provider to forward incoming SMS to Cloud-PBX:
Your Webhook URL:
https://your-pbx-domain.com/api/messaging/sms/inboundProvider Configuration:
- Go to Phone Numbers → Manage → Active Numbers
- Click on your SMS number
- Scroll to Messaging section
- A Message Comes In: Webhook, HTTP POST
- Enter:
https://your-pbx-domain.com/api/messaging/sms/inbound - Click Save
Webhook Receives:
From: Sender phone numberTo: Your phone numberBody: Message textMessageSid: Unique message ID
- Go to Numbers → Your Numbers
- Click Edit on your number
- Inbound Webhook URL: Enter
https://your-pbx-domain.com/api/messaging/sms/inbound - HTTP Method: POST
- Click Save
Webhook Receives:
msisdn: Sender numberto: Your numbertext: Message contentmessageId: Unique ID
- Go to Applications
- Edit your Messaging Application
- Callback URL:
https://your-pbx-domain.com/api/messaging/sms/inbound - Callback HTTP Method: POST
- Save
Webhook Receives:
- Message details in JSON payload
from,to,text,messageId
- Go to Phone Numbers
- Click on your number
- Message URL:
https://your-pbx-domain.com/api/messaging/sms/inbound - Method: POST
- Save
Webhook Receives:
From,To,Text,MessageUUID
- Go to Numbers
- Click on your number settings
- HTTP webhook:
https://your-pbx-domain.com/api/messaging/sms/inbound - Save
Webhook Receives:
originator,recipient,body,id
Webhook Security
Validate incoming webhooks using provider signature verification to prevent spoofing.
Test End-to-End
Verify both outbound and inbound messaging:
Outbound Test:
- Go to Messaging → SMS → Send Test
- Enter your mobile number
- Type test message: "Test from Cloud-PBX SMS"
- Click Send
- Verify you receive message on your phone
Inbound Test:
- Send SMS from your mobile to your provisioned SMS number
- Message should appear in Cloud-PBX inbox
- Check webhook logs for delivery confirmation
- Verify correct routing (if queues configured)
Troubleshooting:
- Outbound fails: Check API credentials, phone number format, account balance
- Inbound fails: Verify webhook URL, check firewall rules, review provider logs
- Delays: Normal 2-5 seconds, check provider status if longer
All Tests Passed
Your SMS integration is fully functional! Proceed to configure settings and routing.
Security Best Practices
Credential Management:
- Never Hardcode: Don't commit credentials to code repositories
- Use Environment Variables: Store credentials securely
- Rotate Regularly: Change credentials periodically
- Limit Access: Only authorized personnel can view
- Use Test/Production Keys: Separate credentials for environments
Webhook Security:
- Signature Verification: Validate requests from provider
- HTTPS Only: Never use HTTP for webhooks
- IP Whitelisting: Restrict to provider IP ranges (if available)
- Rate Limiting: Prevent webhook abuse
- Logging: Monitor webhook activity
Message Security:
- Encrypt at Rest: Store message history encrypted
- Encrypt in Transit: Use TLS/HTTPS for all API calls
- Access Control: Role-based access to messaging
- Audit Logs: Track who sends what
- Content Filtering: Prevent sensitive data in SMS
Provider Comparison
| Feature | Twilio | Vonage | Bandwidth | Plivo | MessageBird |
|---|---|---|---|---|---|
| Global Reach | Excellent | Excellent | US/Canada | Good | Strong EU |
| Pricing | $$$ | $$ | $ | $$ | $$ |
| API Quality | Excellent | Very Good | Good | Good | Very Good |
| Documentation | Excellent | Very Good | Good | Good | Very Good |
| Support | Excellent | Good | Good | Good | Good |
| MMS | Yes | Yes | Yes | Yes | Limited |
| Short Codes | Yes | Yes | Yes | Yes | Limited |
| Best For | All-around | International | US high-volume | Developers | Europe/omni |
Troubleshooting
Authentication Fails:
- Verify credentials copied correctly (no extra spaces)
- Check account status (suspended, billing issue)
- Confirm API permissions enabled
- Test credentials via provider's API explorer
- Check for IP restrictions on API access
Phone Number Not Working:
- Verify SMS capability enabled on number
- Check number is active (not released)
- Confirm webhook configured correctly
- Test by sending from provider console directly
- Review number compliance (A2P registration may be required)
Webhook Not Receiving Messages:
- Verify webhook URL publicly accessible
- Check HTTPS certificate valid
- Review firewall rules (allow provider IPs)
- Test webhook endpoint with curl/Postman
- Check webhook URL configured in provider dashboard
- Review provider webhook logs
High Latency:
- Check provider status page
- Verify geographic routing (use local numbers)
- Review network connectivity
- Test with different provider
- Check for rate limiting
Advanced Configuration
Multiple Providers (Failover): Configure backup providers for redundancy:
- Primary provider for normal traffic
- Secondary provider if primary fails
- Automatic failover on errors
- Load balancing across providers
Number Pooling: Use multiple numbers for high volume:
- Distribute sends across number pool
- Avoid carrier rate limits
- Better deliverability
- Geographic coverage
Custom Sender IDs (International): Some countries allow alphanumeric sender IDs:
- "YourBrand" instead of phone number
- Better brand recognition
- Check country support
- May require registration
Next Steps
Authentication Complete
Your SMS provider is now connected! Configure routing and preferences in Settings.
- Configure Settings: Set up phone numbers, routing, and preferences in SMS Settings
- Create Queues: Route SMS to appropriate teams in Message Queues
- Test Thoroughly: Send test messages to various carriers
- Train Team: Familiarize agents with SMS interface
- Launch: Start customer communication via SMS