Skip to main content

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 signature parameter 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 login parameter 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 signature when 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 timestamp in 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 text parameter
  • 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 sender parameter
  • 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 base parameter 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=1 to update existing template

Status & Tracking Errors​

Error 17: SMS ID not specified​

Description: The state parameter (SMS ID) is missing

Solution:

  • Include state parameter 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 month parameter
  • 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 from parameter
  • 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 to parameter
  • Format: YYYY-MM-DD (e.g., 2024-11-30)

Error 30: No date​

Description: The date parameter is missing (incoming SMS request)

Solution:

  • Include date parameter
  • 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​

CodeDescriptionQuick Solution
000Service unavailableRetry later
1Signature not specifiedAdd signature parameter
2Login not specifiedAdd login parameter
3Text not specifiedAdd message text
4Phone not specifiedAdd phone number
5Sender not specifiedAdd sender name
6Invalid signatureFix signature generation
7Invalid loginCheck login spelling
8Invalid senderUse valid sender format
9Sender not registeredRegister sender first
10Sender not approvedWait for approval
11Forbidden wordsRemove prohibited content
12Sending errorRetry or contact support
13Phone blacklistedCheck blacklist
14Too many numbersMax 100 per request
15List not specifiedAdd base parameter
16Invalid phoneFix phone format
17SMS ID not specifiedAdd state parameter
18Status not obtainedCheck SMS ID
19Empty responseRetry request
20Number existsAlready added
21No nameAdd template name
22Template existsUse override=1
23Month not specifiedAdd month parameter
24Timestamp missingAdd timestamp
25List access errorCheck list ID
26Empty listAdd recipients
27No valid numbersFix phone formats
28Start date missingAdd from parameter
29End date missingAdd to parameter
30Date missingAdd date parameter
31Direction closedContact support
32Insufficient fundsAdd money
33Phone not setAdd phone parameter
34Operator blacklistCannot send
35Insufficient fundsAdd money
36Cannot get infoRetry or contact support
37Base ID not setAdd base parameter
38Phone in baseAlready exists
39Phone not in baseAlready 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)