Skip to main content

Sender Name Management

Manage sender names (sender IDs) that appear on recipients' phones when they receive your SMS messages.

What is a Sender Name?​

A sender name (also called sender ID or originator) is the text that appears as the sender when a recipient receives your SMS message. Instead of seeing a phone number, recipients see your brand name or custom identifier.

Examples:

  • YourBrand
  • ACME-Corp
  • ShopAlert
  • BankName
Important

Sender names must be approved by LightSMS administrators before use. The approval process typically takes 24-48 hours.


Sender Name Requirements​

When registering a sender name, follow these rules:

Alphanumeric Senders​

  • Length: 3-11 characters
  • Characters: Letters (A-Z), numbers (0-9), spaces, hyphens
  • Restrictions:
    • Must start with a letter
    • Cannot be only numbers
    • Cannot contain special characters (!, @, #, etc.)

Numeric Senders​

  • Length: Up to 15 digits
  • Format: Phone number format
  • Use case: When you want replies to go to a specific number
Carrier Restrictions

Some mobile carriers may replace alphanumeric sender names with a phone number. This is a carrier limitation and cannot be controlled by LightSMS.


Get Registered Senders​

Retrieve a list of all sender names registered to your account and their approval status.

Endpoint:

GET https://www.lightsms.com/external/get/senders.php

Required Parameters:

ParameterTypeDescription
loginstringYour LightSMS login
signaturestringMD5 signature
timestampintegerUTC timestamp (valid for 10 seconds)

Optional Parameters:

ParameterTypeDescription
returnstringResponse format: json or xml (default: plain text)

Example Request​

Request (JSON):

curl "https://www.lightsms.com/external/get/senders.php?login=YourLogin&signature=generated_signature&timestamp=1732809600&return=json"

Response (JSON):

{
"YourBrand": "completed",
"ACME-Shop": "completed",
"TestSender": "pending"
}

Response (XML):

<?xml version="1.0" encoding="utf-8"?>
<response>
<senders>
<sender sender="YourBrand" state="completed" />
<sender sender="ACME-Shop" state="completed" />
<sender sender="TestSender" state="pending" />
</senders>
</response>

Sender Status Values​

StatusDescription
completedSender name approved and ready to use
pendingSender name submitted, awaiting approval
rejectedSender name rejected (doesn't meet requirements)
suspendedSender name temporarily suspended

Code Examples​

PHP​

<?php
function getSenders($login, $apiKey) {
// Get timestamp
$timestamp = trim(file_get_contents('https://www.lightsms.com/external/get/timestamp.php'));

// Prepare parameters
$params = [
'login' => $login,
'timestamp' => $timestamp,
'return' => 'json'
];

// Create signature
ksort($params);
$signature = md5(implode($params) . $apiKey);
$params['signature'] = $signature;

// Make request
$url = 'https://www.lightsms.com/external/get/senders.php?' . http_build_query($params);
$response = file_get_contents($url);

return json_decode($response, true);
}

// Configuration
$login = 'YourLogin';
$apiKey = 'your_api_key_here';

// Get all senders
$senders = getSenders($login, $apiKey);

echo "Registered sender names:\n";
foreach ($senders as $sender => $status) {
echo "- $sender: $status\n";
}

// Check if specific sender is approved
if (isset($senders['YourBrand']) && $senders['YourBrand'] === 'completed') {
echo "\nāœ… YourBrand is approved and ready to use!\n";
} else {
echo "\nā³ YourBrand is not yet approved.\n";
}
?>

Python​

import requests
import hashlib
from urllib.parse import urlencode

def get_senders(login, api_key):
# Get timestamp
timestamp_response = requests.get('https://www.lightsms.com/external/get/timestamp.php')
timestamp = timestamp_response.text.strip()

# Prepare parameters
params = {
'login': login,
'timestamp': timestamp,
'return': 'json'
}

# Create signature
sorted_params = sorted(params.items())
param_string = ''.join([str(value) for key, value in sorted_params])
signature = hashlib.md5((param_string + api_key).encode()).hexdigest()
params['signature'] = signature

# Make request
url = f'https://www.lightsms.com/external/get/senders.php?{urlencode(params)}'
response = requests.get(url)

return response.json()

# Configuration
LOGIN = 'YourLogin'
API_KEY = 'your_api_key_here'

# Get all senders
senders = get_senders(LOGIN, API_KEY)

print("Registered sender names:")
for sender, status in senders.items():
print(f"- {sender}: {status}")

# Check if specific sender is approved
if senders.get('YourBrand') == 'completed':
print("\nāœ… YourBrand is approved and ready to use!")
else:
print("\nā³ YourBrand is not yet approved.")

JavaScript (Node.js)​

const crypto = require('crypto');
const axios = require('axios');

async function getSenders(login, apiKey) {
// Get timestamp
const timestampResponse = await axios.get('https://www.lightsms.com/external/get/timestamp.php');
const timestamp = timestampResponse.data.trim();

// Prepare parameters
const params = {
login: login,
timestamp: timestamp,
return: 'json'
};

// Create signature
const sortedKeys = Object.keys(params).sort();
const paramString = sortedKeys.map(key => params[key]).join('');
const signature = crypto.createHash('md5').update(paramString + apiKey).digest('hex');
params.signature = signature;

// Make request
const queryString = new URLSearchParams(params).toString();
const url = `https://www.lightsms.com/external/get/senders.php?${queryString}`;
const response = await axios.get(url);

return response.data;
}

// Configuration
const LOGIN = 'YourLogin';
const API_KEY = 'your_api_key_here';

(async () => {
// Get all senders
const senders = await getSenders(LOGIN, API_KEY);

console.log("Registered sender names:");
for (const [sender, status] of Object.entries(senders)) {
console.log(`- ${sender}: ${status}`);
}

// Check if specific sender is approved
if (senders['YourBrand'] === 'completed') {
console.log("\nāœ… YourBrand is approved and ready to use!");
} else {
console.log("\nā³ YourBrand is not yet approved.");
}
})();

Registering a New Sender Name​

To register a new sender name, use the LightSMS web interface:

Via Web Interface​

  1. Log in to LightSMS admin panel
  2. Navigate to Lists → Senders
  3. Click "Add Sender" or similar option
  4. Enter your desired sender name
  5. Submit for approval

Approval Process​

  1. Submission: You submit the sender name through the web interface
  2. Review: LightSMS administrators review your request (24-48 hours)
  3. Verification: They may verify you have rights to use the name
  4. Approval/Rejection: You receive notification of the decision
  5. Active: Once approved, the sender appears with completed status
Pro Tip

Submit sender names well in advance of your campaign launch to account for the approval time.


Using Approved Senders​

Once a sender name is approved (completed status), you can use it in your SMS sending requests:

// Check sender is approved first
$senders = getSenders($login, $apiKey);
$senderName = 'YourBrand';

if ($senders[$senderName] === 'completed') {
// Send SMS with approved sender
$params = [
'login' => $login,
'phone' => '37061234567',
'text' => 'Hello from YourBrand!',
'sender' => $senderName, // Use approved sender
'timestamp' => $timestamp
];

// ... create signature and send
} else {
echo "Error: Sender '$senderName' is not approved yet.\n";
}

Common Issues​

Error 8: Invalid Sender Name​

Problem: Sender name doesn't meet format requirements

Solutions:

  • āœ… Check sender name length (3-11 characters)
  • āœ… Ensure it starts with a letter
  • āœ… Remove special characters
  • āœ… Verify it's not all numbers

Error 9: Sender Name Not Registered​

Problem: Trying to use a sender that hasn't been registered

Solution: Register the sender name through the web interface first


Error 10: Sender Name Not Approved​

Problem: Sender name is registered but not yet approved

Solutions:

  • āœ… Wait for approval (24-48 hours)
  • āœ… Check status with /senders.php endpoint
  • āœ… Contact support if approval is taking longer

Fallback Strategy​

Implement a fallback for when sender names are replaced by carriers:

function sendWithFallback($phone, $text, $preferredSender) {
// Try with preferred sender
$result = sendSMS($phone, $text, $preferredSender);

// Log if carrier might replace sender
$internationalNumber = substr($phone, 0, 3) !== '370';
if ($internationalNumber) {
logWarning("Carrier may replace sender '$preferredSender' with a number for international messages");
}

return $result;
}

Next Steps​


Need Help?​

For questions about sender name registration and approval: