getFullSms


URL

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

Example

  • javascript
    var settings = {
        "async": true,
        "crossDomain": true,
        "url": "https://api-conserver.onlinesim.ru/stubs/handler_api.php?api_key=APIKEY&action=getFullSms&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=getFullSms&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 SMS full text with activation.

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
FULL_SMS: $msg SMS is received, $msg - full text of SMS

Private method errors

Possible errors in TXT format.

*error_code*

error_code Description
BAD_STATUS phone number booking ID is wrong