getService


URL

https://onlinesim.io/api/getService.php?apikey=APIKEY

Getting the list of services for a repeat order of SMS

Example

  • javascript
    var settings = {
        "async": true,
        "crossDomain": true,
        "url": "https://onlinesim.io/api/getService.php?apikey=APIKEY",
        "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://onlinesim.io/api/getService.php?apikey=APIKEY",
        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));

Parameters

It does not require additional parameters

Result

After the successful completion, you will get a response in the JSON format, in the following form:

json {response:RESPONSE, service: ["service","...","..."]}

Result Description
response 1, if the request has been completed successfully, or an error message;
["service","...","..."] Array of services available for a repeated SMS.

Testing

/demo/api/getService.php?apikey=APIKEY

The method will return generated test data.