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:
YourBrandACME-CorpShopAlertBankName
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
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:
| Parameter | Type | Description |
|---|---|---|
login | string | Your LightSMS login |
signature | string | MD5 signature |
timestamp | integer | UTC timestamp (valid for 10 seconds) |
Optional Parameters:
| Parameter | Type | Description |
|---|---|---|
return | string | Response 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×tamp=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ā
| Status | Description |
|---|---|
completed | Sender name approved and ready to use |
pending | Sender name submitted, awaiting approval |
rejected | Sender name rejected (doesn't meet requirements) |
suspended | Sender 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ā
- Log in to LightSMS admin panel
- Navigate to Lists ā Senders
- Click "Add Sender" or similar option
- Enter your desired sender name
- Submit for approval
Approval Processā
- Submission: You submit the sender name through the web interface
- Review: LightSMS administrators review your request (24-48 hours)
- Verification: They may verify you have rights to use the name
- Approval/Rejection: You receive notification of the decision
- Active: Once approved, the sender appears with
completedstatus
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.phpendpoint - ā 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ā
- Send SMS with custom sender
- View FAQ for common sender name questions
- Contact support for sender name approval inquiries
Need Help?ā
For questions about sender name registration and approval:
- Email: [email protected]
- Phone: Contact Information
- Hours: Monday-Friday, 8:00-20:00 (EET)