Error Codes Reference
Complete reference of all error codes returned by the LightSMS API.
Error Response Format​
When an error occurs, the API returns an error code in the error field:
{
"37061234567": {
"error": "6"
}
}
Authentication & Security Errors​
Error 1: Signature not specified​
Description: The signature parameter is missing from the request
Solution:
- Include
signatureparameter in every request - Generate signature using MD5 hash of sorted parameters + API key
- See Authentication for details
Error 2: Login not specified​
Description: The login parameter is missing from the request
Solution:
- Include your
loginparameter in every request - Verify login spelling
Error 6: Invalid signature​
Description: The signature does not match the expected value
Solutions:
- ✅ Sort parameters alphabetically before concatenating
- ✅ Concatenate only values, not keys
- ✅ Append API key at the end
- ✅ Use lowercase MD5 hash
- ✅ Don't include
signaturewhen generating signature - ✅ Ensure timestamp is current (less than 10 seconds old)
Example (PHP):
// Correct signature generation
$params = ['login' => 'user', 'timestamp' => '1234567890'];
ksort($params);
$signature = md5(implode($params) . $apiKey);
Error 7: Invalid login​
Description: The login is not recognized or account is suspended
Solutions:
- Double-check login spelling
- Ensure account is active
- Contact support if issue persists
Error 24: Timestamp not specified​
Description: The timestamp parameter is missing
Solution:
- Include
timestampin every request - Get fresh timestamp from
/external/get/timestamp.php - Timestamp valid for 10 seconds only
Message Content Errors​
Error 3: Text not specified​
Description: The text parameter is missing or empty
Solution:
- Include message text in
textparameter - Ensure text is properly URL-encoded
Error 11: Forbidden words in text​
Description: Message contains prohibited content or suspicious patterns
Solutions:
- Remove inappropriate words or abbreviations
- Review message content
- Contact support if you believe this is an error
- Messages with forbidden words require manual moderation approval
Recipient Errors​
Error 4: Phone number not specified​
Description: The phone parameter is missing or empty
Solution:
- Include at least one phone number
- Format: country code + number (e.g.,
37061234567)
Error 13: Phone in blacklist​
Description: Recipient's number is in your blacklist
Solutions:
- Check blacklist status
- Remove from blacklist if added by mistake
- Respect opt-out requests
Error 14: Too many numbers in request​
Description: More than 100 phone numbers in single request
Solution:
- Split into batches of maximum 100 numbers
- Send multiple requests
Example:
$allPhones = [...]; // 250 numbers
$batches = array_chunk($allPhones, 100);
foreach ($batches as $batch) {
sendSMS(implode(',', $batch), $text, $sender);
}
Error 16: Invalid phone number​
Description: Phone number format is incorrect
Solutions:
- Use international format with country code
- Remove spaces, dashes, parentheses
- Example:
37061234567(not+370 612 34567)
Error 27: No valid numbers​
Description: None of the provided phone numbers are valid
Solutions:
- Check phone number formats
- Ensure country codes are correct
- Remove special characters
Sender Errors​
Error 5: Sender not specified​
Description: The sender parameter is missing
Solution:
- Include
senderparameter - Use approved sender name
Error 8: Invalid sender name​
Description: Sender name doesn't meet requirements
Solutions:
- Use only Latin letters and numbers
- Maximum 11 characters
- No special characters except spaces
- Register sender through web interface first
Error 9: Sender name not registered​
Description: Sender name hasn't been registered in your account
Solutions:
- Register sender via Lists > Senders in web interface
- Wait for administration approval
- Use already approved sender
Error 10: Sender name not approved​
Description: Sender name is registered but not yet approved
Solutions:
- Wait for administration review (usually 24-48 hours)
- Use an already approved sender
- Contact support for urgent requests
Account & Balance Errors​
Error 32: Not enough money​
Description: Insufficient account balance
Solutions:
- Add funds to your Paysera account
- Check balance:
/external/get/balance.php - Ensure funds are reserved to LightSMS (1 EUR minimum)
Error 35: Not enough money​
Description: Duplicate of error 32 - insufficient balance
Solution: Same as error 32
List Management Errors​
Error 15: List not specified​
Description: The base (list ID) parameter is missing
Solution:
- Include
baseparameter with valid list ID - Get list IDs from
/external/get/base.php
Error 25: Error in access to list​
Description: Cannot access the specified list
Solutions:
- Verify list ID is correct
- Ensure list belongs to your account
- Check if list still exists
Error 26: No numbers in list​
Description: The list is empty
Solution:
- Add recipients to the list first
- Use web interface: Lists > Manage
Error 37: Base ID not set​
Description: List ID parameter is missing when required
Solution: Include base parameter with list ID
Error 38: Phone already exists in base​
Description: Trying to add a number that's already in the list
Solution: Number is already added - no action needed
Error 39: Phone not in base​
Description: Trying to remove a number that's not in the list
Solution: Number is already removed - no action needed
Template Errors​
Error 21: No name​
Description: Template name is missing
Solution: Include name parameter with template identifier
Error 22: Template already exists​
Description: Template name is already in use
Solutions:
- Use different template name
- Set
override=1to update existing template
Status & Tracking Errors​
Error 17: SMS ID not specified​
Description: The state parameter (SMS ID) is missing
Solution:
- Include
stateparameter with SMS ID from send response - For multiple IDs, separate with commas
Error 18: Status not obtained​
Description: Cannot retrieve status for the specified SMS ID
Solutions:
- Verify SMS ID is correct
- Check if SMS ID belongs to your account
- Try again later if SMS was just sent
Date & Time Errors​
Error 23: Month not specified​
Description: The month parameter is missing (statistics request)
Solution:
- Include
monthparameter - Format:
YYYY-MM(e.g.,2024-11)
Error 28: Date of start not specified​
Description: The from parameter is missing (date range request)
Solution:
- Include
fromparameter - Format:
YYYY-MM-DD(e.g.,2024-11-01)
Error 29: Date of end not specified​
Description: The to parameter is missing (date range request)
Solution:
- Include
toparameter - Format:
YYYY-MM-DD(e.g.,2024-11-30)
Error 30: No date​
Description: The date parameter is missing (incoming SMS request)
Solution:
- Include
dateparameter - Format:
YYYY-MM-DD
System Errors​
Error 000: Service unavailable​
Description: LightSMS service is temporarily unavailable
Solutions:
- Wait and retry in a few minutes
- Check status page for announcements
- Contact support if persists
Error 12: Error in SMS sending​
Description: General sending error
Solutions:
- Check all required parameters
- Verify phone number format
- Try again
- Contact support if issue persists
Error 19: Empty response​
Description: API returned empty response
Solutions:
- Check request parameters
- Verify endpoint URL
- Try again
- Contact support if issue persists
Operator & HLR Errors​
Error 31: Closing direction to user​
Description: SMS sending to this destination is disabled
Solutions:
- Contact support to enable destination
- Check if country/operator is supported
Error 33: Phone not set​
Description: Phone parameter is missing for operator lookup
Solution: Include phone parameter
Error 34: Phone is in stop list​
Description: Number is blacklisted by operator
Solution: Number cannot receive SMS - try alternative contact method
Error 36: Cannot obtain phone information​
Description: HLR lookup failed
Solutions:
- Verify phone number is valid
- Try again later
- Contact support if issue persists
Quick Reference Table​
| Code | Description | Quick Solution |
|---|---|---|
| 000 | Service unavailable | Retry later |
| 1 | Signature not specified | Add signature parameter |
| 2 | Login not specified | Add login parameter |
| 3 | Text not specified | Add message text |
| 4 | Phone not specified | Add phone number |
| 5 | Sender not specified | Add sender name |
| 6 | Invalid signature | Fix signature generation |
| 7 | Invalid login | Check login spelling |
| 8 | Invalid sender | Use valid sender format |
| 9 | Sender not registered | Register sender first |
| 10 | Sender not approved | Wait for approval |
| 11 | Forbidden words | Remove prohibited content |
| 12 | Sending error | Retry or contact support |
| 13 | Phone blacklisted | Check blacklist |
| 14 | Too many numbers | Max 100 per request |
| 15 | List not specified | Add base parameter |
| 16 | Invalid phone | Fix phone format |
| 17 | SMS ID not specified | Add state parameter |
| 18 | Status not obtained | Check SMS ID |
| 19 | Empty response | Retry request |
| 20 | Number exists | Already added |
| 21 | No name | Add template name |
| 22 | Template exists | Use override=1 |
| 23 | Month not specified | Add month parameter |
| 24 | Timestamp missing | Add timestamp |
| 25 | List access error | Check list ID |
| 26 | Empty list | Add recipients |
| 27 | No valid numbers | Fix phone formats |
| 28 | Start date missing | Add from parameter |
| 29 | End date missing | Add to parameter |
| 30 | Date missing | Add date parameter |
| 31 | Direction closed | Contact support |
| 32 | Insufficient funds | Add money |
| 33 | Phone not set | Add phone parameter |
| 34 | Operator blacklist | Cannot send |
| 35 | Insufficient funds | Add money |
| 36 | Cannot get info | Retry or contact support |
| 37 | Base ID not set | Add base parameter |
| 38 | Phone in base | Already exists |
| 39 | Phone not in base | Already removed |
Debugging Tips​
1. Log Errors​
function handleSMSError($phone, $errorCode) {
$errorMessages = [
'6' => 'Invalid signature',
'13' => 'Phone blacklisted',
'32' => 'Insufficient funds'
];
$message = $errorMessages[$errorCode] ?? "Unknown error: {$errorCode}";
error_log("SMS to {$phone} failed: {$message}");
return $message;
}
2. Validate Before Sending​
def validate_sms_request(phone, text, sender):
errors = []
if not phone:
errors.append("Phone number required")
elif not re.match(r'^\d{10,15}$', phone):
errors.append("Invalid phone format")
if not text or len(text) == 0:
errors.append("Message text required")
if not sender:
errors.append("Sender name required")
return errors
3. Retry Logic​
async function sendSMSWithRetry(params, maxRetries = 3) {
for (let i = 0; i < maxRetries; i++) {
try {
const result = await sendSMS(params);
if (result.error === '0') {
return result;
}
// Don't retry for certain errors
if (['6', '7', '13', '32'].includes(result.error)) {
throw new Error(`Non-retryable error: ${result.error}`);
}
await new Promise(resolve => setTimeout(resolve, 1000 * (i + 1)));
} catch (error) {
if (i === maxRetries - 1) throw error;
}
}
}
Need Help?​
If you're experiencing errors not listed here or need assistance:
- Email: [email protected]
- Phone: Contact Information
- Business hours: Monday-Friday, 8:00-20:00 (EET)