Webcom Mobi API Docs
RU
  • Introduction
  • СПОСОБЫ ВЗАИМОДЕЙСТВИЯ С A2P ПЛАТФОРМОЙ
    • JSON specification
      • Sending SMS, Viber, Flash SMS, WAP-Push
      • SMS status request
        • POST request
        • Webhook
      • Balance check request
    • HTTP GET specification
      • Sending SMS
      • Sending Viber
      • Sending Cascade
      • Request message status
      • Registration
    • XML specification
      • Sending SMS, Viber, Flash SMS, WAP-Push
      • SMS status request
        • POST request
        • Webhook
      • Balance check request
      • Request to receive a list of senders
      • Request to add senders
      • Request for incoming SMS
      • Request for information by phone number
      • Request for obtaining the list of bases
      • Request to change parameters, add/remove bases
      • Request for receiving the list of subscribers of the base
      • Request to add/edit/delete subscribers of the base
      • Request to get the list of numbers from the STOP list
      • Request to add/remove subscribers to the STOP list
      • Request to receive the list of scheduled SMS
      • Request to delete a scheduled SMS
      • Request to get the time of change of something
      • Request for time verification
      • File upload request
      • Request to refill users' balance
    • ВЗАИМОДЕЙСТВИЕ С ПЛАТФОРМОЙ MSG (НЕОФ КАНАЛЫ)
    • Specification JSON
      • Чекинг базы номеров
Powered by GitBook
On this page
  1. СПОСОБЫ ВЗАИМОДЕЙСТВИЯ С A2P ПЛАТФОРМОЙ

JSON specification

Last updated 5 months ago

The formats of requests and responses to the API comply with the specification .

The method of dispatch is always POST

Query headers should always contain

Content-type: text/json; charset=utf-8;

JSON document encoding: UTF-8

Server address for sending requests

http://lk.mysmpp.ru

Examples of JSON transfer

<?php
    // JSON-document
    $src = json_encode([
        "login" => "login",
        "password" => "password"
    ]);
    // server address
    $href = 'http://server/script.php';
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: text/json; charset=utf-8'));
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_CRLF, true);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $src);
    curl_setopt($ch, CURLOPT_URL, $href);
    $result = curl_exec($ch);
    curl_close($ch);
    echo $result;
JSON API v1.0