Credits
This request is used to retrieve your available SMS credits, as well as the number of pending outgoing SMS.
URL
GET
https://api.smspartner.fr/v1/me
Required Parameters
Name
Value
apiKey
Optional Parameters
Name
Value
_format
json
or xml
Requests
<?php
// Prepare data for GET request
$data = 'apiKey=YOUR_API_KEY';
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL,'https://api.smspartner.fr/v1/me?'.$data);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, 10);
$result = curl_exec($curl);
curl_close($curl);
// Process your response here
echo $result;
?>
Response
{
"success": true,
"code": 200,
"user": {
"username": "[email protected]",
"firstname": "John",
"lastname": "Doe"
},
"credits": {
"creditSms": 269082,
"creditSmsECO": 444570,
"creditHlr": 2045023,
"toSend": 0,
"solde": "10225.119",
"currency": "EUR",
"balance": "10225.119"
}
}
Error Codes
Response Code
Message
10
Invalid API key
200
Everything went fine!
Last updated