1. Once you purchase the OTP SMS service, you will get your API Key in your client area.
2. Use the PHP code below to send the OTP from your website/application. If you want, you can use API to integrate in any language. We are using PHP here, because of high demand by users.
<?php
$num = "Enter mobile number here";
$otp = "OTP number to send";
$dv_key = "Enter key here";
$otp_url = "https://otp.dvconnect.in/api-sms-v1.php?" . http_build_query([
'api_key' => $dv_key,
'number' => $num,
'otp' => $otp,
]);
$response = file_get_contents($otp_url);
if ($response === false) {
error_log("DVConnect OTP request failed: " . print_r(error_get_last(), true));
}
?>
