Crédits du compte: récupérer le nombre de crédit restant
Get /account/credits
Paramètres :
Aucun
Réponse :
| Nom | Description | Type |
|---|---|---|
| credits | Nombre de crédits | Int |
Langage de programmation :
Exemple de réponse :
{
"credits": 150000
}
Exemple de code :
curl -X GET -H "Content-Type: application/json" -H "X-Tipimail-apiUser:YOUR_SMTP_USERNAME" -H "X-Tipimail-ApiKey:YOUR_SMTP_KEY" https://api.tipimail.com/v1/account/credits
require 'vendor/autoload.php';
$tipimail = new Tipimail\Tipimail('YOUR_SMTP_USERNAME', 'YOUR_API_KEY');
try {
$result = $tipimail->getAccountsService()->getAccountData()->getCredits();
var_dump($result);
}
catch(Tipimail\Exceptions\TipimailException $e) {
echo 'Exception received :', $e->getMessage(), "\n";
}