SDKs & Libraries
Use our official SDKs to integrate Galatext APIs into your application quickly and easily.
Available SDKs
Node.js / JavaScript
The official Galatext Node.js SDK provides a simple, promise-based interface for all API endpoints.
Installation:
bash
npm install galatext-api
# or
yarn add galatext-apiUsage:
javascript
const Galatext = require('galatext-api');
const client = new Galatext({
apiKey: process.env.GALATEXT_API_KEY
});
// Send an SMS
async function sendSMS() {
try {
const response = await client.sms.send({
phoneNumber: '+254712345678',
message: 'Hello from Galatext SDK!',
senderId: 'YOURBRAND'
});
console.log('Message sent:', response.messageId);
} catch (error) {
console.error('Error:', error.message);
}
}
sendSMS();
// Send a WhatsApp message
async function sendWhatsApp() {
const response = await client.whatsapp.send({
phoneNumber: '+254712345678',
type: 'text',
text: { body: 'Hello from WhatsApp API!' }
});
}
// Check account balance
async function checkBalance() {
const balance = await client.account.getBalance();
console.log('Credits:', balance.creditsRemaining);
}Links:
Python
The Python SDK makes it easy to integrate Galatext into your Django, Flask, or FastAPI applications.
Installation:
bash
pip install galatext-pythonUsage:
python
from galatext import GalatextClient
client = GalatextClient(api_key="YOUR_API_KEY")
# Send an SMS
response = client.sms.send(
phone_number="+254712345678",
message="Hello from Galatext Python SDK!",
sender_id="YOURBRAND"
)
print(f"Message sent: {response.message_id}")
# Send WhatsApp message
response = client.whatsapp.send(
phone_number="+254712345678",
message_type="text",
text={"body": "Hello from WhatsApp!"}
)
# Check balance
balance = client.account.balance()
print(f"Credits remaining: {balance.credits_remaining}")
# Bulk SMS
response = client.sms.bulk(
recipients=[
{"phoneNumber": "+254712345678"},
{"phoneNumber": "+254723456789"}
],
message="Welcome to our platform!",
sender_id="YOURBRAND"
)Links:
Coming Soon
| Language | Status | Expected |
|---|---|---|
| PHP | 🚧 In Development | Q3 2025 |
| Go | 🚧 In Development | Q3 2025 |
| Java | 📋 Planned | Q4 2025 |
| Ruby | 📋 Planned | Q4 2025 |
| C# / .NET | 📋 Planned | Q1 2026 |
Community SDKs
Community-maintained SDKs are not officially supported by Galatext. Use at your own risk.
| Language | Maintainer | Link |
|---|---|---|
| Dart/Flutter | Community | GitHub |
| Laravel (PHP) | Community | GitHub |
Direct API Access
If you prefer to use the API directly without an SDK, you can make HTTP requests to our REST API:
bash
curl -X POST https://api.galatext.com/api/sms/send \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"phoneNumber": "+254712345678",
"message": "Hello from direct API call!",
"senderId": "GALATEX"
}'Base Configuration
All SDKs share common configuration options:
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | Required | Your Galatext API key |
baseURL | string | https://api.galatext.com | API base URL (use sandbox for testing) |
timeout | number | 30000 | Request timeout in milliseconds |
maxRetries | number | 3 | Number of retry attempts on failure |
Contributing
We welcome contributions! See our contribution guidelines on GitHub: