Ecuador SMS Market Overview: Mobile Landscape and Carriers
Locale name:
Ecuador
ISO code:
EC
Region
South America
Mobile country code (MCC)
740
Dialing Code
+593
Market Conditions: If you're looking to send SMS messages to Ecuador, understanding the local mobile market is crucial. Ecuador operates a robust mobile telecommunications market with three major carriers: Claro (53% market share as of early 2025), Movistar (29% market share), and CNT Mobile (18% market share) (source: BNamericas). SMS serves as a vital channel for business notifications and authentication, though WhatsApp dominates personal messaging. Android devices dominate the market, with iOS maintaining a smaller but growing presence among urban users.
Mobile Statistics: Ecuador connects approximately 18 million mobile devices with a penetration rate of 102% as of March 2025 (source: U.S. ITA). Internet penetration reaches 83.7% of the population, with over 15.2 million internet users (source: DataReportal).
Key SMS Features and Capabilities in Ecuador
Ecuador supports standard SMS functionality with carrier-specific limitations, particularly around concatenated messages and sender ID preservation.
Two-way SMS Support
Ecuador does not support two-way SMS through most providers. Design your SMS strategies around one-way communication flows.
Technical Implications:
Inbound messages from recipients won't reach the sender
Direct to app deep links (e.g., "Open MyApp to respond")
In-app messaging, account management
Click-to-Call
Add phone numbers with call prompts
Urgent support, sales inquiries
Email Follow-up
Include email address for non-urgent replies
Detailed feedback, document requests
Concatenated Messages (Segmented SMS)
Support: Concatenated SMS support varies by carrier. Movistar does not support concatenated messages.
Message length rules: Keep messages under 160 GSM-7 characters to ensure delivery. For UCS-2 encoding, limit to 70 characters.
Encoding considerations: While GSM-7 and UCS-2 encoding work across carriers, Movistar has limited UCS-2 support. Use GSM-7 encoding whenever possible.
What happens when concatenated messages are sent to Movistar: Messages exceeding 160 characters sent to Movistar subscribers will be truncated, delivered incompletely, or fail entirely. To ensure reliable delivery on Movistar, keep messages under 160 GSM-7 characters or 70 UCS-2 characters.
Character Counting Guidelines:
Standard GSM-7 characters: Each character = 1 unit (A-Z, a-z, 0-9, basic punctuation)
Extended GSM-7 characters: Each character = 2 units (€, ^, {, }, [, ], ~, |, )
Special characters & emojis: Force UCS-2 encoding, reducing limit to 70 characters per message
Accented characters: Most Spanish accents (á, é, í, ó, ú, ñ) are part of GSM-7 and count as 1 unit
Best practice: Test character count using SMS length calculators before sending campaigns
MMS Support
Ecuador does not directly support MMS messages. When you send MMS content, it automatically converts to SMS with an embedded URL where recipients can view the multimedia content.
MMS-to-SMS Conversion Details:
Aspect
Details
Hosting
Content hosted on provider's CDN (Twilio, Sinch, etc.)
URL Format
Shortened URLs (typically 20-30 characters)
Expiration
30-90 days depending on provider (Twilio: 90 days, Sinch: 30 days)
File Types
JPEG, PNG, GIF up to 5 MB
Best Practice
Compress images to <500 KB for faster loading
Recipient Phone Number Compatibility
Number Portability
Number portability works in Ecuador, allowing users to keep their phone numbers when switching carriers. Messages route properly to the current carrier without impacting delivery.
Sending SMS to Landlines
Ecuador does not support sending SMS to landline numbers. Attempts to send messages to landlines result in delivery failures, typically with a 400 response error (code 21614). These messages won't appear in logs and won't incur charges.
Validation Best Practices:
Use Twilio Lookup API or similar services to verify number types before sending
Implement number format validation to identify potential landline patterns
Maintain a suppression list of known landline numbers
Monitor error code 21614 in logs and flag those numbers for review
SMS Compliance and Regulatory Requirements in Ecuador
While Ecuador lacks stringent SMS-specific regulations, follow international best practices and general telecommunications guidelines overseen by ARCOTEL (Agencia de Regulación y Control de las Telecomunicaciones).
Penalties and Enforcement: While specific SMS penalties lack extensive documentation, ARCOTEL has authority under the Organic Law of Telecommunications (2015) to:
Block domains and services that violate national laws
Impose fines for telecommunications violations
Revoke operating licenses for serious infractions
Order content filtering at the carrier level
Send spam or prohibited content and risk having messages blocked by carriers, potential legal action, and sender reputation damage that affects future deliverability.
Consent and Opt-In Requirements
While explicit opt-in requirements lack strict legal mandate in Ecuador, implement strong consent practices:
Obtain clear, documented consent before sending marketing messages
Maintain detailed records of how and when you obtained consent
Provide clear terms of service explaining message frequency and content type
Include information about potential messaging charges
Compliant Opt-In Examples:
Code
✅ Good: "Reply YES to receive weekly promotions from MiBanco. Standard SMS rates apply. Reply STOP to opt out."
✅ Good: "Check this box to receive order updates and exclusive offers via SMS (max 4/month). You can opt out anytime by texting STOP."
❌ Bad: "We may send you messages." (vague, no frequency, no opt-out)
❌ Bad: "Sign up for our newsletter." (doesn't mention SMS channel)
HELP/STOP and Other Commands
Though not legally required, implement standard opt-out mechanisms:
Support both "HELP" and "STOP" keywords in Spanish ("AYUDA" and "PARAR")
Process opt-out requests within 24 hours
Send confirmation messages in Spanish when users opt out
Maintain opt-out lists indefinitely
Example Response Messages:
Code
HELP Response:
"MiBanco: Recibe ofertas y alertas. Máx 4 msgs/mes. Responde PARAR para cancelar. Ayuda: 1800-BANCO"
(MiBanco: Receive offers and alerts. Max 4 msgs/month. Reply STOP to cancel. Help: 1800-BANCO)
STOP Response:
"MiBanco: Confirmado. No recibirás más mensajes. Gracias."
(MiBanco: Confirmed. You will not receive more messages. Thank you.)
Do Not Call / Do Not Disturb Registries
Ecuador does not maintain an official Do Not Call or Do Not Disturb registry. However, you should:
Maintain your own suppression lists
Honor opt-out requests immediately
Keep records of opted-out numbers
Regularly clean contact lists to remove inactive numbers
Time Zone Sensitivity
Ecuador operates in ECT (UTC-5) with no daylight savings time. While no legal restrictions exist on messaging hours:
Send non-urgent messages between 8:00 AM and 8:00 PM local time
Reserve early morning or late night messages for critical alerts only
Consider business days (Monday-Friday) for marketing messages
Phone Number Options and SMS Sender ID Types for Ecuador
Alphanumeric Sender ID
Operator network capability: Partially supported
Registration requirements: No pre-registration required
Claro and Movistar: Overwrite with short codes (typically generic short codes like 9107 or similar carrier-assigned codes)
Short Code Replacements: When Claro and Movistar overwrite alphanumeric sender IDs, they replace them with carrier-assigned short codes. Claro uses 9107 for marketing content delivery (source: Salesforce). These replacements occur automatically and you cannot customize them without formal short code registration.
Possible legal action under telecommunications regulations
Permanent blacklisting from carrier networks
Account suspension by SMS service providers
Content Filtering
Known Carrier Filters:
Links may trigger spam filters
All-caps messages often get flagged
Multiple exclamation marks may trigger filtering
Best Practices to Avoid Filtering:
Practice
Good Example
Bad Example
Professional tone
"MiBanco: Your payment of $50 was received. Thank you."
"URGENT!!! ACT NOW!!! LIMITED TIME!!!"
Punctuation
"Your order #12345 shipped today."
"Your order shipped!!!! Track it now!!!!"
Company identification
"MiBanco Alert: Low balance warning."
"Alert: Check your account now."
URL usage
"View details: mibanco.com/account"
"Click here: bit.ly/xyz123 NOW!!!"
Best Practices for SMS Marketing and Messaging in Ecuador
Messaging Strategy
Keep messages under 160 characters
Include clear call-to-actions
Use company name in sender ID when possible
Avoid URL shorteners that might trigger spam filters
Message Effectiveness Examples:
Code
✅ Effective: "MiBanco: Your $200 transfer to Account *1234 completed. Balance: $1,850. Questions? Call 1800-BANCO"
(145 characters, clear CTA, sender ID, concise)
✅ Effective: "TuTienda: Order #5678 shipped via Servientrega. Track: tutienda.com/track ETA: Mar 15"
(92 characters, actionable link, specific details)
❌ Ineffective: "Hi! Your transaction was processed successfully and we wanted to let you know that everything went through okay."
(115 characters, no sender ID, vague, no CTA, wordy)
❌ Ineffective: "CLICK HERE NOW FOR AMAZING DEALS!!! LIMITED TIME OFFER!!! bit.ly/deals123"
(All-caps, excessive punctuation, suspicious URL, no sender ID)
Sending Frequency and Timing
Limit marketing messages to 2-4 per month
Space messages at least 48 hours apart
Respect local holidays and cultural events
Monitor engagement rates to optimize timing
Major Ecuador Holidays to Avoid (2025):
January 1: New Year's Day
March 3-4: Carnival
April 17-18: Maundy Thursday & Good Friday
May 1-2: Labor Day
May 23-24: Battle of Pichincha
August 10-11: Independence Day (Quito)
October 9-10: Independence of Guayaquil
November 2-4: All Souls' Day / Independence of Cuenca
Include prices in USD (Ecuador's official currency)
Ecuador-Specific Spanish Variations:
Standard Spanish
Ecuador Variation
Example
Autobús (bus)
Bus
"Su bus llega en 5 min"
Ordenador (computer)
Computadora
"Accede desde tu computadora"
Móvil (mobile)
Celular
"Verifica desde tu celular"
Vale (okay)
Ya / Listo
"Ya procesamos tu pago"
Opt-Out Management
Process opt-outs within 24 hours
Send confirmation of opt-out completion
Maintain centralized opt-out database
Regularly audit opt-out list compliance
Testing and Monitoring
Test across all three major carriers
Monitor delivery rates by carrier
Track engagement metrics
Regularly test opt-out functionality
Key Metrics Thresholds to Monitor:
Metric
Good Threshold
Warning Threshold
Action Threshold
Delivery Rate
>95%
90-95%
<90% (investigate carrier issues)
Opt-Out Rate
<2% per campaign
2-5%
>5% (review content/frequency)
Click-Through Rate
>5% for transactional
2-5%
<2% (optimize CTA/timing)
Response Rate
>3% for marketing
1-3%
<1% (reconsider strategy)
Error Rate (30003)
<3%
3-7%
>7% (check carrier status)
SMS API Integrations and Providers for Ecuador
Twilio
Twilio provides a robust SMS API with comprehensive Ecuador support. Integration requires an account SID and auth token for authentication. Learn more about Twilio SMS API documentation and SMS pricing.
Ecuador-Specific Considerations:
Pricing: $0.045-0.065 per SMS segment (varies by carrier)
Reliability: 98% delivery rate across all carriers
Sender ID: Overwritten by Claro/Movistar; preserved on CNT Mobile
Best For: High-volume transactional messages, 2FA
TypeScript
import * asTwiliofrom'twilio';
// Initialize Twilio client with your credentialsconst client = newTwilio(
process.env.TWILIO_ACCOUNT_SID, // Your Account SID
process.env.TWILIO_AUTH_TOKEN// Your Auth Token
);
// Function to send SMS to EcuadorasyncfunctionsendSmsToEcuador(to: string,
message: string): Promise<void> {
try {
// Ensure number is in E.164 format for Ecuador (+593)const formattedNumber = to.startsWith('+593') ? to : `+593${to}`;
const response = await client.messages.create({
body: message,
to: formattedNumber,
from: process.env.TWILIO_PHONE_NUMBER,
// Optional: Force messages to be sent as SMS onlycontentType: 'text/plain'
});
console.log(`Message sent successfully! SID: ${response.sid}`);
} catch (error) {
console.error('Error sending message:', error);
}
}
Ecuador-Specific Error Handling Examples:
TypeScript
asyncfunctionsendSmsWithErrorHandling(to: string,
message: string): Promise<void> {
try {
const response = await client.messages.create({
body: message,
to: to,
from: process.env.TWILIO_PHONE_NUMBER
});
console.log(`Message sent: ${response.sid}`);
} catch (error: any) {
// Handle Ecuador-specific errorsif (error.code === 21614) {
console.error('Landline number detected. Cannot send SMS to landlines in Ecuador.');
// Add to landline suppression list
} elseif (error.code === 30003) {
console.warn('Device unreachable. May be powered off or out of coverage.');
// Implement retry logic with exponential backoff
} elseif (error.code === 30005) {
console.error('Unknown/inactive number. Remove from contact list.');
// Flag for removal from database
} elseif (error.code === 30004) {
console.error('Message blocked due to spam filters.');
// Review message content for filtering triggers
} else {
console.error('Unexpected error:', error.message);
}
}
}
Webhook Setup for Delivery Receipts:
TypeScript
import express from'express';
import { urlencoded } from'body-parser';
const app = express();
app.use(urlencoded({ extended: false }));
// Webhook endpoint for Twilio delivery receipts
app.post('/twilio/status', (req, res) => {
const {
MessageSid,
MessageStatus,
To,
ErrorCode
} = req.body;
console.log(`Message ${MessageSid} to ${To}: ${MessageStatus}`);
// Handle different statusesswitch (MessageStatus) {
case'delivered':
// Update database: message delivered successfullybreak;
case'failed':
case'undelivered':
// Log error and flag for reviewconsole.error(`Delivery failed: Error ${ErrorCode}`);
break;
case'sent':
// Message sent to carrier, awaiting delivery confirmationbreak;
}
res.sendStatus(200);
});
app.listen(3000);
Sinch
Sinch offers direct carrier connections in Ecuador with support for both transactional and marketing messages. For more information, visit Sinch SMS API.
Frequently Asked Questions: Sending SMS to Ecuador
How do I send SMS messages to Ecuador?
To send SMS to Ecuador, you need an SMS API provider like Twilio, Sinch, or Plivo. Format phone numbers in E.164 format (+593XXXXXXXXX), keep messages under 160 characters for Movistar compatibility, and obtain proper opt-in consent before sending marketing messages.
What is the SMS character limit for Ecuador?
The SMS character limit in Ecuador is 160 characters for GSM-7 encoding or 70 characters for UCS-2 encoding (with special characters/emojis). Movistar does not support concatenated messages, so messages exceeding these limits may be truncated.
Do I need consent to send SMS in Ecuador?
While Ecuador lacks strict legal requirements for SMS opt-in, following international best practices is essential. Always obtain clear, documented consent before sending marketing messages and implement STOP/HELP functionality in Spanish (PARAR/AYUDA).
What SMS providers work in Ecuador?
Major SMS providers supporting Ecuador include Twilio, Sinch, MessageBird, and Plivo. These providers offer varying pricing ($0.045-0.065 per message), delivery rates (95-98%), and throughput limits (100-250 messages per second).
Recap and Additional Resources
Key Takeaways:
Always use E.164 number formatting (+593)
Keep messages under 160 GSM-7 characters for Movistar compatibility
Test across all three carriers (Claro, Movistar, CNT Mobile)
Implement proper error handling with retry logic for temporary failures
Process opt-outs within 24 hours and maintain suppression lists
Avoid sending between 8 PM and 8 AM local time (UTC-5)
Decision Tree for Implementation:
Code
1. Choose SMS Provider
→ High volume + 2FA? → Twilio
→ Direct carrier connections? → Sinch
→ Budget-conscious? → Plivo
2. Configure Sender ID
→ Need brand recognition? → Use alphanumeric ID (works on CNT only)
→ Maximum deliverability? → Use international long code
3. Set Up Message Validation
→ Validate E.164 format → Use Lookup API
→ Check character count → Use SMS length calculator
→ Test on all carriers → Send test messages
4. Implement Error Handling
→ Retry 30003 errors (device unreachable)
→ Suppress 21614 errors (landlines)
→ Remove 30005 errors (inactive numbers)
→ Review content for 30004 errors (spam filters)
5. Monitor & Optimize
→ Delivery rate >95%? → Continue
→ Delivery rate <95%? → Investigate carrier issues
→ Opt-out rate >5%? → Review content/frequency
Check carrier status page; contact provider support
Users can't reply
Two-way SMS not supported
Add web form URL or phone number for responses
Frequently asked questions
Use E.164 formatting (+593) for phone numbers and choose an SMS API provider like Twilio, Sinch, MessageBird, or Plivo. Keep messages under 160 characters and avoid special characters that may be filtered by Ecuadorian carriers. Consider using GSM-7 encoding for wider carrier compatibility.
Several providers, including Twilio, Sinch, MessageBird, and Plivo, offer good connectivity in Ecuador. Twilio and Plivo offer higher throughput rates, while Sinch and MessageBird have direct carrier connections. The best option will depend on your specific needs, including budget and messaging volume.
Messages should be kept under 160 GSM-7 encoded characters, or 70 characters for UCS-2 encoding. Concatenated or segmented SMS has limited support, specifically Movistar doesn't support it, so it's best to keep messages short.
The article doesn't explicitly state why Movistar doesn't support concatenated SMS. However, given this limitation, it's best to avoid sending multi-part messages when targeting users on the Movistar network in Ecuador.
The best practice is to send marketing SMS between 8 AM and 8 PM local time (ECT, UTC-5) and reserve other times for critical alerts. It's recommended to limit marketing messages to 2-4 per month, sent at least 48 hours apart.
MMS messages are not directly supported. MMS content is converted to SMS with a link where recipients can view the multimedia content, making it functionally usable but not true MMS.
While not legally required, supporting "AYUDA" (help) and "PARAR" (stop) is recommended. Process opt-out requests within 24 hours, send Spanish confirmation messages, and keep opt-out lists indefinitely.
Best practices include implementing "AYUDA" and "PARAR" keywords. Opt-out requests should be processed within 24 hours, with confirmations sent in Spanish. Maintain opt-out lists and regularly audit for compliance.
Ecuador doesn't have strict opt-in regulations but following global consent best practices is strongly recommended. Get clear, documented consent before sending marketing messages, explain the message frequency and purpose, and inform users about potential charges.
Religious, adult, gambling, and discriminatory/racial content are prohibited in SMS messages. Regulated industries like finance and healthcare have additional content restrictions related to identification and privacy.
Always use the E.164 international number format, starting with +593 followed by the 9-digit subscriber number. This ensures proper routing and delivery across all carriers, despite number portability.
The mobile country code (MCC) for Ecuador is 740. This is used for routing international SMS messages.
Implement queue systems (Redis, RabbitMQ), utilize batch APIs, monitor throughput and adjust sending rates, and use exponential backoff for error retries. Follow carrier best practices for messages and respect local time and culture.
Sending SMS to landlines in Ecuador is not supported and attempts will fail. Expect 400 error responses (code 21614), no message logging, and no charges to your account.
Alphanumeric sender IDs are partially supported. CNT Mobile allows dynamic sender IDs but Claro and Movistar may overwrite them with shortcodes (which aren't available). No pre-registration is needed.
Ecuador SMS Market Overview: Mobile Landscape and Carriers
Market Conditions: If you're looking to send SMS messages to Ecuador, understanding the local mobile market is crucial. Ecuador operates a robust mobile telecommunications market with three major carriers: Claro (53% market share as of early 2025), Movistar (29% market share), and CNT Mobile (18% market share) (source: BNamericas). SMS serves as a vital channel for business notifications and authentication, though WhatsApp dominates personal messaging. Android devices dominate the market, with iOS maintaining a smaller but growing presence among urban users.
Mobile Statistics: Ecuador connects approximately 18 million mobile devices with a penetration rate of 102% as of March 2025 (source: U.S. ITA). Internet penetration reaches 83.7% of the population, with over 15.2 million internet users (source: DataReportal).
Key SMS Features and Capabilities in Ecuador
Ecuador supports standard SMS functionality with carrier-specific limitations, particularly around concatenated messages and sender ID preservation.
Two-way SMS Support
Ecuador does not support two-way SMS through most providers. Design your SMS strategies around one-way communication flows.
Technical Implications:
Workarounds:
Concatenated Messages (Segmented SMS)
Support: Concatenated SMS support varies by carrier. Movistar does not support concatenated messages.
Message length rules: Keep messages under 160 GSM-7 characters to ensure delivery. For UCS-2 encoding, limit to 70 characters.
Encoding considerations: While GSM-7 and UCS-2 encoding work across carriers, Movistar has limited UCS-2 support. Use GSM-7 encoding whenever possible.
What happens when concatenated messages are sent to Movistar: Messages exceeding 160 characters sent to Movistar subscribers will be truncated, delivered incompletely, or fail entirely. To ensure reliable delivery on Movistar, keep messages under 160 GSM-7 characters or 70 UCS-2 characters.
Character Counting Guidelines:
MMS Support
Ecuador does not directly support MMS messages. When you send MMS content, it automatically converts to SMS with an embedded URL where recipients can view the multimedia content.
MMS-to-SMS Conversion Details:
Recipient Phone Number Compatibility
Number Portability
Number portability works in Ecuador, allowing users to keep their phone numbers when switching carriers. Messages route properly to the current carrier without impacting delivery.
Sending SMS to Landlines
Ecuador does not support sending SMS to landline numbers. Attempts to send messages to landlines result in delivery failures, typically with a 400 response error (code 21614). These messages won't appear in logs and won't incur charges.
Validation Best Practices:
SMS Compliance and Regulatory Requirements in Ecuador
While Ecuador lacks stringent SMS-specific regulations, follow international best practices and general telecommunications guidelines overseen by ARCOTEL (Agencia de Regulación y Control de las Telecomunicaciones).
Penalties and Enforcement: While specific SMS penalties lack extensive documentation, ARCOTEL has authority under the Organic Law of Telecommunications (2015) to:
Send spam or prohibited content and risk having messages blocked by carriers, potential legal action, and sender reputation damage that affects future deliverability.
Consent and Opt-In Requirements
While explicit opt-in requirements lack strict legal mandate in Ecuador, implement strong consent practices:
Compliant Opt-In Examples:
HELP/STOP and Other Commands
Though not legally required, implement standard opt-out mechanisms:
Example Response Messages:
Do Not Call / Do Not Disturb Registries
Ecuador does not maintain an official Do Not Call or Do Not Disturb registry. However, you should:
Time Zone Sensitivity
Ecuador operates in ECT (UTC-5) with no daylight savings time. While no legal restrictions exist on messaging hours:
Phone Number Options and SMS Sender ID Types for Ecuador
Alphanumeric Sender ID
Operator network capability: Partially supported
Registration requirements: No pre-registration required
Sender ID preservation: Varies by carrier:
Short Code Replacements: When Claro and Movistar overwrite alphanumeric sender IDs, they replace them with carrier-assigned short codes. Claro uses 9107 for marketing content delivery (source: Salesforce). These replacements occur automatically and you cannot customize them without formal short code registration.
Choosing Effective Alphanumeric Sender IDs (for CNT Mobile):
Long Codes
Domestic vs. International: International long codes supported; domestic not available
Sender ID preservation: No, except for CNT Mobile
Provisioning time: Immediate for international numbers
Use cases: Ideal for:
Short Codes
Support: Not currently supported in Ecuador
Provisioning time: N/A
Use cases: N/A
Restricted SMS Content and Industry Regulations in Ecuador
Ecuador maintains several content restrictions for SMS messaging:
Implementing Sender Identification:
Consequences of Sending Prohibited Content:
Content Filtering
Known Carrier Filters:
Best Practices to Avoid Filtering:
Best Practices for SMS Marketing and Messaging in Ecuador
Messaging Strategy
Message Effectiveness Examples:
Sending Frequency and Timing
Major Ecuador Holidays to Avoid (2025):
(source: TimeAndDate)
Localization
Ecuador-Specific Spanish Variations:
Opt-Out Management
Testing and Monitoring
Key Metrics Thresholds to Monitor:
SMS API Integrations and Providers for Ecuador
Twilio
Twilio provides a robust SMS API with comprehensive Ecuador support. Integration requires an account SID and auth token for authentication. Learn more about Twilio SMS API documentation and SMS pricing.
Ecuador-Specific Considerations:
import * as Twilio from 'twilio'; // Initialize Twilio client with your credentials const client = new Twilio( process.env.TWILIO_ACCOUNT_SID, // Your Account SID process.env.TWILIO_AUTH_TOKEN // Your Auth Token ); // Function to send SMS to Ecuador async function sendSmsToEcuador( to: string, message: string ): Promise<void> { try { // Ensure number is in E.164 format for Ecuador (+593) const formattedNumber = to.startsWith('+593') ? to : `+593${to}`; const response = await client.messages.create({ body: message, to: formattedNumber, from: process.env.TWILIO_PHONE_NUMBER, // Optional: Force messages to be sent as SMS only contentType: 'text/plain' }); console.log(`Message sent successfully! SID: ${response.sid}`); } catch (error) { console.error('Error sending message:', error); } }Ecuador-Specific Error Handling Examples:
async function sendSmsWithErrorHandling( to: string, message: string ): Promise<void> { try { const response = await client.messages.create({ body: message, to: to, from: process.env.TWILIO_PHONE_NUMBER }); console.log(`Message sent: ${response.sid}`); } catch (error: any) { // Handle Ecuador-specific errors if (error.code === 21614) { console.error('Landline number detected. Cannot send SMS to landlines in Ecuador.'); // Add to landline suppression list } else if (error.code === 30003) { console.warn('Device unreachable. May be powered off or out of coverage.'); // Implement retry logic with exponential backoff } else if (error.code === 30005) { console.error('Unknown/inactive number. Remove from contact list.'); // Flag for removal from database } else if (error.code === 30004) { console.error('Message blocked due to spam filters.'); // Review message content for filtering triggers } else { console.error('Unexpected error:', error.message); } } }Webhook Setup for Delivery Receipts:
import express from 'express'; import { urlencoded } from 'body-parser'; const app = express(); app.use(urlencoded({ extended: false })); // Webhook endpoint for Twilio delivery receipts app.post('/twilio/status', (req, res) => { const { MessageSid, MessageStatus, To, ErrorCode } = req.body; console.log(`Message ${MessageSid} to ${To}: ${MessageStatus}`); // Handle different statuses switch (MessageStatus) { case 'delivered': // Update database: message delivered successfully break; case 'failed': case 'undelivered': // Log error and flag for review console.error(`Delivery failed: Error ${ErrorCode}`); break; case 'sent': // Message sent to carrier, awaiting delivery confirmation break; } res.sendStatus(200); }); app.listen(3000);Sinch
Sinch offers direct carrier connections in Ecuador with support for both transactional and marketing messages. For more information, visit Sinch SMS API.
import axios from 'axios'; interface SinchSmsConfig { apiToken: string; servicePlanId: string; fromNumber: string; } class SinchSmsService { private readonly baseUrl: string; private readonly headers: Record<string, string>; constructor(private config: SinchSmsConfig) { this.baseUrl = 'https://sms.api.sinch.com/xms/v1'; this.headers = { 'Authorization': `Bearer ${config.apiToken}`, 'Content-Type': 'application/json' }; } async sendSms(to: string, message: string): Promise<void> { try { const response = await axios.post( `${this.baseUrl}/${this.config.servicePlanId}/batches`, { from: this.config.fromNumber, to: [to], body: message }, { headers: this.headers } ); console.log('Message sent:', response.data.id); } catch (error) { console.error('Sinch SMS error:', error); } } }MessageBird
MessageBird provides reliable SMS delivery in Ecuador with support for delivery reporting. Check out MessageBird SMS API for implementation details.
import messagebird from 'messagebird'; class MessageBirdService { private client: any; constructor(apiKey: string) { this.client = messagebird(apiKey); } sendSms( to: string, message: string, originator: string ): Promise<any> { return new Promise((resolve, reject) => { this.client.messages.create({ originator, recipients: [to], body: message, // Optional parameters for Ecuador reportUrl: 'https://your-webhook.com/delivery-reports', validity: 24 // Message validity in hours }, (err: any, response: any) => { if (err) { reject(err); } else { resolve(response); } }); }); } }Plivo
Plivo offers competitive rates for Ecuador with high-quality routes. Learn more at Plivo SMS API.
import plivo from 'plivo'; class PlivoService { private client: any; constructor(authId: string, authToken: string) { this.client = new plivo.Client(authId, authToken); } async sendSms( src: string, dst: string, text: string ): Promise<void> { try { const response = await this.client.messages.create({ src, // Your Plivo number dst, // Destination number in E.164 format text, // Ecuador-specific parameters url: 'https://your-webhook.com/status', method: 'POST' }); console.log('Message sent:', response.messageUuid); } catch (error) { console.error('Plivo error:', error); } } }API Rate Limits and Throughput
Strategies for Large-Scale Sending:
Queue Implementation Example (Redis + Bull):
import Queue from 'bull'; import Redis from 'ioredis'; // Create SMS queue const smsQueue = new Queue('ecuador-sms', { redis: { host: 'localhost', port: 6379 } }); // Add messages to queue async function queueSms(to: string, message: string) { await smsQueue.add({ to, message, timestamp: Date.now() }, { attempts: 3, backoff: { type: 'exponential', delay: 2000 } }); } // Process queue with rate limiting smsQueue.process(10, async (job) => { // Process 10 at a time const { to, message } = job.data; try { await sendSmsToEcuador(to, message); return { success: true }; } catch (error) { throw error; // Triggers retry } });Error Handling and Reporting
Common Error Codes Explained:
Error Handling Implementation with Retry Logic:
interface RetryConfig { maxAttempts: number; baseDelay: number; maxDelay: number; } async function sendWithRetry( to: string, message: string, config: RetryConfig = { maxAttempts: 3, baseDelay: 1000, maxDelay: 10000 } ): Promise<void> { let attempt = 0; while (attempt < config.maxAttempts) { try { await sendSmsToEcuador(to, message); console.log(`Message delivered on attempt ${attempt + 1}`); return; } catch (error: any) { attempt++; // Don't retry on permanent failures if (error.code === 21614 || error.code === 30005) { console.error(`Permanent failure (${error.code}): ${error.message}`); // Add to suppression list await addToSuppressionList(to, error.code); throw error; } // Retry on temporary failures (30003, 30004) if (error.code === 30003 || error.code === 30004) { if (attempt < config.maxAttempts) { const delay = Math.min( config.baseDelay * Math.pow(2, attempt - 1), config.maxDelay ); console.log(`Attempt ${attempt} failed. Retrying in ${delay}ms...`); await new Promise(resolve => setTimeout(resolve, delay)); } else { console.error(`Failed after ${config.maxAttempts} attempts`); throw error; } } else { // Unknown error, don't retry throw error; } } } } async function addToSuppressionList(phoneNumber: string, errorCode: number) { // Implementation depends on your database console.log(`Adding ${phoneNumber} to suppression list (reason: ${errorCode})`); }Frequently Asked Questions: Sending SMS to Ecuador
How do I send SMS messages to Ecuador?
To send SMS to Ecuador, you need an SMS API provider like Twilio, Sinch, or Plivo. Format phone numbers in E.164 format (+593XXXXXXXXX), keep messages under 160 characters for Movistar compatibility, and obtain proper opt-in consent before sending marketing messages.
What is the SMS character limit for Ecuador?
The SMS character limit in Ecuador is 160 characters for GSM-7 encoding or 70 characters for UCS-2 encoding (with special characters/emojis). Movistar does not support concatenated messages, so messages exceeding these limits may be truncated.
Do I need consent to send SMS in Ecuador?
While Ecuador lacks strict legal requirements for SMS opt-in, following international best practices is essential. Always obtain clear, documented consent before sending marketing messages and implement STOP/HELP functionality in Spanish (PARAR/AYUDA).
What SMS providers work in Ecuador?
Major SMS providers supporting Ecuador include Twilio, Sinch, MessageBird, and Plivo. These providers offer varying pricing ($0.045-0.065 per message), delivery rates (95-98%), and throughput limits (100-250 messages per second).
Recap and Additional Resources
Key Takeaways:
Decision Tree for Implementation:
Next Steps:
Additional Resources:
Troubleshooting FAQ: