
textbee.dev Use Cases
Discover how businesses and developers leverage textbee.dev SMS Gateway for a wide variety of applications. Get inspired by these common use cases and implementations.
Discover how businesses and developers leverage textbee.dev SMS Gateway for a wide variety of applications. Get inspired by these common use cases and implementations.
Two-factor Authentication (2FA)
Enhance your application's security by implementing SMS-based two-factor authentication. Add an extra layer of verification to protect user accounts.
Implementation Steps:
- Generate a random verification code for the user
- Send the code via SMS using textbee.dev API
- Verify the code entered by the user
Example:
// Send 2FA code
const verificationCode = generateRandomCode();
await axios.post(`https://api.textbee.dev/api/v1/gateway/devices/\${DEVICE_ID}/send-sms`, {
recipients: [ user.phoneNumber ],
message: `Your verification code is: \${verificationCode}`
}, {
headers: { 'x-api-key': API_KEY }
});
Order Notifications
Keep customers informed about their orders with real-time SMS updates. Improve customer experience with timely notifications throughout the order lifecycle.
Example Applications:
- Order Confirmation - Send details after purchase
- Shipping Updates - Notify when order ships
- Delivery Status - Alert when delivered
- Order Changes - Inform of modifications
Example:
// Send order confirmation
await axios.post(`https://api.textbee.dev/api/v1/gateway/devices/\${DEVICE_ID}/send-sms`, {
recipients: [ customer.phoneNumber ],
message: `Order #\${orderNumber} confirmed! Expected delivery: \${deliveryDate}. Track at: \${trackingUrl}`
}, {
headers: { 'x-api-key': API_KEY }
});
Appointment Reminders
Reduce no-shows by sending automated appointment reminders to clients. Perfect for medical practices, salons, consultants, and service businesses.
Example Applications:
- Scheduled reminders (24h, 1h before appointments)
- Interactive responses (reply to reschedule/cancel)
- Calendar integration
Example:
// Schedule reminder job
scheduler.scheduleJob(reminderTime, async () => {
await axios.post(`https://api.textbee.dev/api/v1/gateway/devices/\${DEVICE_ID}/send-sms`, {
recipients: [ appointment.phoneNumber ],
message: `Reminder: Your appointment is tomorrow at \${appointment.time}. Reply CONFIRM to confirm or RESCHEDULE to change.`
}, {
headers: { 'x-api-key': API_KEY }
});
});
Emergency Alerts
Send critical notifications and emergency alerts to large groups of people quickly. Perfect for natural disasters, emergencies, and critical business communications.
Applications:
- Weather emergencies
- Campus/school alerts
- IT system outages
- Critical business communications
Example:
// Send bulk emergency alert
const recipients = await getUserPhoneNumbers(affectedRegion);
await axios.post(`https://api.textbee.dev/api/v1/gateway/devices/\${DEVICE_ID}/send-bulk-sms`, {
messageTemplate: `ALERT: \${emergencyMessage}. Stay safe.`,
messages: [{
recipients: recipients,
}]
}, {
headers: { 'x-api-key': API_KEY }
});
Marketing Campaigns
Run targeted SMS marketing campaigns to engage customers and drive sales. Perfect for promotions, event announcements, and customer surveys.
Campaign Types:
- Promotional offers and discounts
- New product announcements
- Event invitations
- Customer surveys
Note: Always ensure you have proper consent and comply with SMS marketing regulations in your region.
Customer Support
Provide customer support through two-way SMS communication. Perfect for handling customer inquiries and feedback.
Recommended: Webhooks (Real-time)
For real-time SMS receiving, we recommend using webhooks. This approach ensures immediate delivery of incoming messages without the need to poll the API.
Setup
- Go to textbee.dev/dashboard and click "Create Webhook"
- Specify your delivery URL endpoint
- Select events (e.g., "Message Received", "Message Sent", "Message Delivered", "Message Failed")
- Save your webhook secret for signature verification
When a new SMS is received, textbee.dev will send a POST request to your webhook URL with the event data. Your endpoint should accept POST requests, return a 2XX status code, and process the request within 10 seconds.
Webhook Payload
Message Received Event:
{
"smsId": "smsId",
"sender": "+123456789",
"message": "message",
"receivedAt": "2025-10-05T13:00:35.208Z",
"deviceId": "deviceId",
"webhookSubscriptionId": "webhookSubscriptionId",
"webhookEvent": "MESSAGE_RECEIVED"
}
Implementation Examples
Node.js (Express):
const crypto = require('crypto');
const express = require('express');
const app = express();
app.use(express.json());
function verifyWebhookSignature(payload, signature, secret) {
const hmac = crypto.createHmac('sha256', secret);
const digest = hmac.update(JSON.stringify(payload)).digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(digest)
);
}
app.post('/webhook', async (req, res) => {
const signature = req.headers['x-signature'];
const payload = req.body;
if (!verifyWebhookSignature(payload, signature, WEBHOOK_SECRET)) {
return res.status(401).json({ error: 'Invalid signature' });
}
// Process incoming SMS
if (payload.webhookEvent === 'MESSAGE_RECEIVED') {
const response = await generateSupportResponse(payload.message);
await sendReply(payload.sender, response);
}
res.status(200).send('OK');
});
Python (Flask):
import hmac
import hashlib
import json
from flask import Flask, request
app = Flask(__name__)
def verify_signature(payload, signature, secret):
expected = hmac.new(
secret.encode('utf-8'),
json.dumps(payload).encode('utf-8'),
hashlib.sha256
).hexdigest()
return hmac.compare_digest(signature, expected)
@app.route('/webhook', methods=['POST'])
def webhook():
signature = request.headers.get('X-Signature')
payload = request.json
if not verify_signature(payload, signature, WEBHOOK_SECRET):
return 'Invalid signature', 401
# Process incoming SMS
if payload['webhookEvent'] == 'MESSAGE_RECEIVED':
response = generate_support_response(payload['message'])
send_reply(payload['sender'], response)
return 'OK', 200
Note: Webhooks include automatic retry logic. If we don't receive a successful response, we'll retry at increasing intervals: 3 minutes, 5 minutes, 30 minutes, 1 hour, 6 hours, 1 day, 3 days, 7 days, 30 days.
Alternative: Fetching Received SMS (Polling)
If webhooks aren't suitable for your setup, you can periodically fetch received messages from the API.
// Check for new messages
const messages = await axios.get(
`https://api.textbee.dev/api/v1/gateway/devices/\${DEVICE_ID}/get-received-sms`,
{ headers: { 'x-api-key': API_KEY } }
);
// Process and respond to messages
for (const msg of messages.data) {
const response = await generateSupportResponse(msg.message);
await sendReply(msg.sender, response);
}
Custom Integrations
textbee.dev can be integrated with various platforms and services. Our REST API allows you to create custom integrations for almost any application, automating SMS sending and receiving based on triggers in your existing systems.
Example Integrations:
- CRM Systems - Connect SMS messaging with customer records
- Booking Software - Automate appointment confirmations
- E-commerce - Send order & shipping updates
- Automation Tools - Integrate with Zapier, Make, N8N, IFTTT, etc.
Webhooks Support
Configure webhooks to receive notifications when SMS events occur. Perfect for event-driven architectures and real-time applications.
POST https://your-server.com/webhook?event=sms_received&sender=+1234567890
API Documentation
Our comprehensive API documentation provides all the details you need to integrate textbee.dev with your applications and services. Visit api.textbee.dev for complete documentation.
Ready to implement these use cases?
Follow our step-by-step quickstart guide to set up textbee.dev and start sending SMS messages in minutes. Whether you're implementing 2FA, appointment reminders, or complex integrations, we've got you covered.
You may also like
textbee.dev SMS Gateway Quickstart
Get started with textbee.dev SMS Gateway in minutes. Learn how to send and receive SMS messages using your Android phone as an SMS gateway for your applications.
How to Send SMS Programmatically with textbee: A Complete Guide
Learn how to integrate textbee SMS gateway into your applications with step-by-step instructions and code examples in multiple programming languages.