User Tools

Site Tools


Sidebar

en:objects:smsactivate:functional:get_balance

get_balance

get_balance(); - get the balance

After testing, the function returns the result of its work to the script :
  • balance on the service – current balance on the service

    Possible error:
    BAD_KEY - invalid API key
    ERROR_SQL - SQL server error



    PHP example:

    <?php $xhe_host = "127.0.0.1:7010";
     
    //connect the object to control the emulator, if not already connected
    if(!isset($path))
       $path = "../../../Templates/xweb_human_emulator.php";
    require($path);
     
    //Start
    echo "<hr> <font color = blue> smsactivate->".basename(__FILE__)."</font> <hr>";
     
    //set the service api key
    $smsactivate->api_key = '3161df9b1fe1ccb8cfd7dA91db765de8';
    //get balance
    echo $smsactivate->get_balance();
     
    //end
    echo "<hr> <br>";
     
    //Quit
    $app->quit();
    ?>

    Python example:

     

    C# example:

     

    Java Script example:

     
  • en/objects/smsactivate/functional/get_balance.txt · Last modified: 2020/10/13 21:47 (external edit)