SDKs
Official client libraries to integrate CubeConnect into your application.
Available SDKs
| SDK | Language | Status |
|---|---|---|
| PHP SDK (Laravel) | PHP 8.1+ / Laravel 10+ | Available |
| JavaScript SDK | Node.js / Browser | Coming Soon |
| Python SDK | Python 3.9+ | Coming Soon |
Why Use an SDK?
While you can call the REST API directly, SDKs provide:
- Type safety - Typed request and response objects
- Error handling - Automatic retry logic and error parsing
- Convenience - Helper methods for common operations
- Authentication - Built-in API key management
Direct API Usage
Until the SDKs are released, use the REST API directly. Here's a quick reference:
php
// Using Laravel HTTP client
$response = Http::withToken(env('CUBECONNECT_API_KEY'))
->post('https://cubeconnect.io/api/v1/messages/send', [
'phone' => '+966501234567',
'message_type' => 'text',
'data' => ['body' => 'Hello!'],
]);javascript
// Using fetch
const response = await fetch('https://cubeconnect.io/api/v1/messages/send', {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
phone: '+966501234567',
message_type: 'text',
data: { body: 'Hello!' },
}),
})python
# Using requests
import requests
response = requests.post(
'https://cubeconnect.io/api/v1/messages/send',
headers={'Authorization': f'Bearer {api_key}'},
json={
'phone': '+966501234567',
'message_type': 'text',
'data': {'body': 'Hello!'},
},
)Stay Updated
SDKs are under active development. Check the Changelog for release announcements.