getStatus


URL

http://api-conserver.onlinesim.ru/stubs/handler_api.php?api_key=APIKEY&action=getStatus&id=$id

Example

  • javascript
    var settings = {
        "async": true,
        "crossDomain": true,
        "url": "https://api-conserver.onlinesim.ru/stubs/handler_api.php?api_key=APIKEY&action=getStatus&id=123",
        "method": "GET",
        "headers": {"accept": "application/json"}
    }
    $.ajax(settings).done(function (response) {
        console.log(response);
    });
  • php
    $curl = curl_init();
    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://api-conserver.onlinesim.ru/stubs/handler_api.php?api_key=APIKEY&action=getStatus&id=123",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_SSL_VERIFYHOST => false,
        CURLOPT_SSL_VERIFYPEER => false,
        CURLOPT_HTTPHEADER => [
            "Content-Type: application/json",
        ]
    ));
    $response = curl_exec($curl);
    curl_close($curl);
    var_dump(json_decode($response, true));

Getting activation status.

Parameters

Parameter name Data type Description Required
id INT ID of phone number booked for activation, displayed when the number is ordered for activation (getNumber) yes

Result

After successeful execution you will get the following TXT response:

*result*

result Description
STATUS_WAIT_CODE awaiting for SMS
STATUS_OK: $msg SMS is received, $msg - received code

Private method errors

Possible errors in TXT format.

*error_code*

error_code Description
BAD_STATUS phone number booking ID is wrong