Get credit: get the number of remaining credit

Get /account/credits

Parameters:

None

Response:

Name Description Type
credits Number of credit Int
Programming language:

Response exemple:

							{
								"credits": 150000
							}
							

Code example:

								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";
	
}