Integrate SMS, OTP, Voice, and WhatsApp APIs in under 5 minutes with complete code samples.
https://otp.l.cd/api/send_sms.php
curl -X POST "https://otp.l.cd/api/send_sms.php" \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_API_KEY",
"mobile": "919876543210",
"sender_id": "SMSHUB",
"message": "Your verification OTP is 492018. - OTP LCD",
"type": "otp"
}'
<?php
$url = "https://otp.l.cd/api/send_sms.php";
$data = array(
"api_key" => "YOUR_API_KEY",
"mobile" => "919876543210",
"sender_id" => "SMSHUB",
"message" => "Your verification OTP is 492018. - OTP LCD",
"type" => "otp"
);
$options = array(
"http" => array(
"header" => "Content-Type: application/json\r\n",
"method" => "POST",
"content" => json_encode($data)
)
);
$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
echo $response;
?>
import requests
url = "https://otp.l.cd/api/send_sms.php"
payload = {
"api_key": "YOUR_API_KEY",
"mobile": "919876543210",
"sender_id": "SMSHUB",
"message": "Your verification OTP is 492018. - OTP LCD",
"type": "otp"
}
response = requests.post(url, json=payload)
print(response.json())
const axios = require('axios');
axios.post('https://otp.l.cd/api/send_sms.php', {
api_key: 'YOUR_API_KEY',
mobile: '919876543210',
sender_id: 'SMSHUB',
message: 'Your verification OTP is 492018. - OTP LCD',
type: 'otp'
})
.then(response => console.log(response.data))
.catch(error => console.error(error));