PHP code example of zmtech / api.zmtech.ru

1. Go to this page and download the library: Download zmtech/api.zmtech.ru 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/ */

    

zmtech / api.zmtech.ru example snippets


$authClient = new ZMTechAPI\Clients\AuthClient($id, $password, $baseUri = 'https://api.zmtech.ru:7778/v1'); // Создаем клиента для последующих запросов
$zm_tech = new ZMTechAPI\ZMTech($authClient); // Создаем экземпляр библиотеки

$user = $zm_tech->get('account')->getAccountInfo();

$smsBrand = $zm_tech->get('sms')->sendBrandSms([
    [
        'sender' => 'ZAZUMEDIA',
        'message' => 'Hello, Zazu!',
        'phone' => '79183411414'
    ],
    [
        'sender' => 'ZAZUMEDIA',
        'message' => 'Hello, Zazu! x2',
        'phone' => '79183411415'
    ]
]);

$smsNeutral = $zm_tech->get('sms')->sendNeutralSms([
    [
        'message' => 'Hello, Zazu!',
        'phone' => '79183411414'
    ],
    [
        'message' => 'Hello, Zazu! x2',
        'phone' => '79183411415'
    ]
]);

$statuses = $zm_tech->get('status')->getStatuses();