Get Remaining Credits. Requires "get_credits" API permission.
QUERY PARAMETERS
secret
required
|
string
The API secret you copied from (Tools -> API Keys) page |
Responses
Successful response
Error response
Example:
<?php
// Define the API endpoint and parameters
$url = "https://www.hallo-mobile.de/api/get/credits?secret=YOUR_API_SECRET";// Initialize cURL session
$ch = curl_init();// Set cURL options
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);// Execute the request
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);// Handle the response
if ($http_code === 200) {
echo "Success: " . $response;
} else {
echo "Error: HTTP Code " . $http_code . ", Response: " . $response;
}// Close cURL session
curl_close($ch);
Response samples
{
"status": 200,
"message": "Remaining Credits",
"data": {
"credits": "798.634",
"currency": "GBP"
}
}or
{
"status": 400,
"message": "Invalid Parameters!",
"data": false
}