API Documentation
DHRU-compatible REST API v1. Connect to our platform using standard DHRU API format.
Login required
Log in to view your API credentials and manage your API key.
DHRU Connection Settings
API URL:
https://imei.date/api/v1
Method:
POST
Format:
JSON / DHRU Standard
To connect from another DHRU panel: use the API URL above, your username, and your API access key. Supports standard, PHP array parameters[FIELD], and XML string formats.
API Endpoints
Get your account balance and information.
Request Example
curl -X POST https://imei.date/api/v1 \
-d "username=YOUR_USERNAME" \
-d "apiaccesskey=YOUR_API_KEY" \
-d "action=accountinfo"Response Example
{
"SUCCESS": [{
"message": "Your Account Info",
"Account": {
"credit": "USD25.50USD",
"creditraw": "25.50",
"mail": "user@example.com",
"currency": "USD"
}
}],
"apiversion": "8.1"
}Error Response Format
{
"ERROR": [
{ "MESSAGE": "Authentication failed. Check username and API access key." }
],
"apiversion": "8.1"
}Order Status Codes
0
Pending
1
Processing
2
Rejected
3
Completed
PHP Integration Example
<?php
class DhruApi {
private $url;
private $username;
private $apiKey;
public function __construct($url, $username, $apiKey) {
$this->url = $url;
$this->username = $username;
$this->apiKey = $apiKey;
}
private function request($action, $params = []) {
$data = array_merge([
'username' => $this->username,
'apiaccesskey' => $this->apiKey,
'action' => $action,
], $params);
$ch = curl_init($this->url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$response = curl_exec($ch);
curl_close($ch);
return json_decode($response, true);
}
public function getBalance() {
return $this->request('accountinfo');
}
public function getServices() {
return $this->request('imeiservicelist');
}
public function placeOrder($serviceId, $imei) {
return $this->request('placeimeiorder', [
'parameters[ID]' => $serviceId,
'parameters[IMEI]' => $imei,
]);
}
public function getOrder($orderId) {
return $this->request('getimeiorder', [
'parameters[ID]' => $orderId,
]);
}
}
// Usage:
$api = new DhruApi('https://imei.date/api/v1', 'your_username', 'your_api_key');
// Check balance
$balance = $api->getBalance();
echo "Balance: " . $balance['SUCCESS'][0]['Account']['creditraw'] . " USD\n";
// Get services
$services = $api->getServices();
// Place order
$order = $api->placeOrder(101, '123456789012345');
$orderId = $order['SUCCESS'][0]['REFERENCEID'];
// Check order status
$status = $api->getOrder($orderId);
echo "Status: " . $status['SUCCESS'][0]['STATUS'] . "\n";
echo "Result: " . $status['SUCCESS'][0]['CODE'] . "\n";
?>