function in api client class to check sms credit.