Quick Start
Invia il tuo primo messaggio in 3 minuti. Scegli il tuo canale e segui l'esempio per il tuo linguaggio preferito.
Prerequisiti
- Account Qlara attivo
- API key (trovala nella tua dashboard account)
Invia SMS
Endpoint: POST https://lora-api.agiletelecom.com/api/message-server/sms/send
SMS è raggiungimento universale. Nessun template o approvazioni necessari.
- cURL
- Python
- Node.js
curl -X POST https://lora-api.agiletelecom.com/api/message-server/sms/send \
-H "Content-Type: application/json" \
-H "X-Api-Key: your_api_key_here" \
-d '{
"phoneNumber": "+393901234567",
"message": "Hello! This is your first SMS via Qlara.",
"senderName": "Qlara"
}'
import requests
url = "https://lora-api.agiletelecom.com/api/message-server/sms/send"
headers = {
"Content-Type": "application/json",
"X-Api-Key": "your_api_key_here"
}
payload = {
"phoneNumber": "+393901234567",
"message": "Hello! This is your first SMS via Qlara.",
"senderName": "Qlara"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const axios = require('axios');
const url = 'https://lora-api.agiletelecom.com/api/message-server/sms/send';
const headers = {
'Content-Type': 'application/json',
'X-Api-Key': 'your_api_key_here'
};
const payload = {
phoneNumber: '+393901234567',
message: 'Hello! This is your first SMS via Qlara.',
senderName: 'Qlara'
};
axios.post(url, payload, { headers })
.then(response => console.log(response.data))
.catch(error => console.error(error));
Invia RCS
Endpoint: POST https://lora-api.agiletelecom.com/api/message-server/rcs/send
RCS fornisce rich media su Android. Richiede un template approvato.
- cURL
- Python
- Node.js
curl -X POST https://lora-api.agiletelecom.com/api/message-server/rcs/send \
-H "Content-Type: application/json" \
-H "X-Api-Key: your_api_key_here" \
-d '{
"phoneNumber": "+393901234567",
"templateId": "template_123",
"variables": {
"name": "John"
}
}'
import requests
url = "https://lora-api.agiletelecom.com/api/message-server/rcs/send"
headers = {
"Content-Type": "application/json",
"X-Api-Key": "your_api_key_here"
}
payload = {
"phoneNumber": "+393901234567",
"templateId": "template_123",
"variables": {
"name": "John"
}
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const axios = require('axios');
const url = 'https://lora-api.agiletelecom.com/api/message-server/rcs/send';
const headers = {
'Content-Type': 'application/json',
'X-Api-Key': 'your_api_key_here'
};
const payload = {
phoneNumber: '+393901234567',
templateId: 'template_123',
variables: {
name: 'John'
}
};
axios.post(url, payload, { headers })
.then(response => console.log(response.data))
.catch(error => console.error(error));
Invia WhatsApp
Endpoint: POST https://lora-api.agiletelecom.com/api/message-server/whatsapp/send
I messaggi WhatsApp devono utilizzare template approvati da Meta. I messaggi liberi sono consentiti entro 24 ore dall'interazione con il cliente.
- cURL
- Python
- Node.js
curl -X POST https://lora-api.agiletelecom.com/api/message-server/whatsapp/send \
-H "Content-Type: application/json" \
-H "X-Api-Key: your_api_key_here" \
-d '{
"phoneNumber": "+393901234567",
"templateId": "template_456",
"variables": {
"name": "John",
"code": "ABC123"
}
}'
import requests
url = "https://lora-api.agiletelecom.com/api/message-server/whatsapp/send"
headers = {
"Content-Type": "application/json",
"X-Api-Key": "your_api_key_here"
}
payload = {
"phoneNumber": "+393901234567",
"templateId": "template_456",
"variables": {
"name": "John",
"code": "ABC123"
}
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const axios = require('axios');
const url = 'https://lora-api.agiletelecom.com/api/message-server/whatsapp/send';
const headers = {
'Content-Type': 'application/json',
'X-Api-Key': 'your_api_key_here'
};
const payload = {
phoneNumber: '+393901234567',
templateId: 'template_456',
variables: {
name: 'John',
code: 'ABC123'
}
};
axios.post(url, payload, { headers })
.then(response => console.log(response.data))
.catch(error => console.error(error));