1. If you are using DV Hosting OTP SMS API, you can easily check your available OTP SMS balance using a simple API request.
API Endpoint
https://otp.dvconnect.in/otp_count_api.php?api_key=API_KEY
Replace API_KEY with your actual API key.
Example Request
curl "https://otp.dvconnect.in/otp_count_api.php?api_key=YOUR_API_KEY"
Example Response
{
"return": true,
"sms_count": 150,
"message": "OTP SMS count fetched successfully."
}
Response Parameters
| Parameter | Description |
|---|---|
| return | API request status (true/false) |
| sms_count | Available OTP SMS balance |
| message | Response message |
Error Responses
Missing API Key
{
"return": false,
"message": "Missing API Key."
}
Invalid API Key
{
"return": false,
"message": "Invalid API Key."
}
Use Cases
- Display SMS balance in your application dashboard- Monitor OTP SMS credits automatically
- Alert administrators when SMS balance becomes low
- Integrate balance checking into billing and reporting systems
The API returns data in JSON format, making it easy to integrate with PHP, Python, Node.js, Java, and other programming languages.
