PHP code example of unapi / gsm-mts

1. Go to this page and download the library: Download unapi/gsm-mts library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

unapi / gsm-mts example snippets



use unapi\gsm\mts\Service;
use unapi\gsm\mts\Anticaptcha;

$service = new Service([
    'anticaptcha' => new Anticaptcha(new AntigateService([...]),
]);


    /** @var \Psr\Http\Message\ResponseInterface $response */
    $response = $service->auth('9250000000', 'password')->wait();


    /** @var float $balance */
    $balance = $service->getBalance()->wait();