<?php
$apiKey = "otp_live_YOUR_API_KEY";
$url = "https://otpsignal.com/api/otp/send";
$payload = [
"recipient" => "+9647515171795",
"channel" => "whatsapp",
"purpose" => "login",
];
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . $apiKey,
"Content-Type: application/json",
"Accept: application/json",
],
CURLOPT_POSTFIELDS => json_encode($payload),
CURLOPT_TIMEOUT => 30,
]);
$response = curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$data = json_decode($response, true);
if ($code >= 400) {
throw new Exception($data["error"] ?? "Send failed");
}
echo $data["request_id"] . " " . $data["cost_iqd"] . " " . $data["balance_iqd"];
Response
{
"success": true,
"request_id": 42,
"channel": "whatsapp",
"recipient": "+9647515171795",
"cost_iqd": 25,
"balance_iqd": 3825,
"currency": "IQD",
"expires_in": 300,
"delivered_via": "whatsapp-web",
"message": "OTP sent via WhatsApp"
}
Step 1
Get your API key
Create a workspace, request balance, then generate a key from the dashboard.
Step 2
Send an OTP
POST /api/otp/send with recipient, channel (whatsapp, email, asia, korek, or zain), and optional purpose. Same JSON from PHP, Node, Python, or any HTTP client.
Step 3
Verify the code
POST /api/otp/verify with recipient, otp, and request_id from the send response.