NAV
shell python php

Getting started

All requests must go to http://api1.5sim.net/stubs/handler_api.php

For compatibility with existing software, where there is no our service, but there is our API

For Windows

Add the line 88.99.223.62 domain in the file C:\Windows\System32\drivers\etc\hosts, replace domain with the desired domain that is used in the software

For Linux

Add the line 88.99.223.62 domain in the file /etc/hosts, replace domain with the desired domain that is used in the software

If the software does not work

Download the root certificate и установите его:

Windows

Linux

sudo mkdir /usr/share/ca-certificates/extra

sudo cp 5sim_rootCA.crt /usr/share/ca-certificates/extra/5sim_rootCA.crt

Numbers

Request for the number of available numbers

Request example

curl "http://api1.5sim.net/stubs/handler_api.php?api_key=$api_key&action=getNumbersStatus&country=$country"
import requests

api_key = 'Your token' country = 0

params = ( ('api_key', api_key), ('country', country), ('action', 'getNumbersStatus') )

response = requests.get('http://api1.5sim.net/stubs/handler_api.php', params=params)

<?php

$api_key = 'Your token'; $ch = curl_init(); $country = 0; $action = 'getNumbersStatus';

curl_setopt($ch, CURLOPT_URL, 'http://api1.5sim.net/stubs/handler_api.php?api_key=' . $api_key . '&country =' . $country . '&action=' . $action); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

$result = curl_exec($ch); if (curl_errno($ch)) { echo 'Error:' . curl_error($ch); } curl_close($ch);

Response example

{
    "at_0":"330",
    "fb_0":"330",
    "gm_0":"323",
    "go_0":"323",
    "ig_0":"326",
    "mb_0":"330",
    "mm_0":"330",
    "ok_0":"330",
    "or_0":"315",
    "ot_0":"315",
    "qw_0":"327",
    "tg_0":"329",
    "tw_0":"330",
    "vi_0":"330",
    "vk_0":"292",
    "vr_0":"330",
    "wa_0":"330",
    "wb_0":"328",
    "we_0":"330",
    "ya_0":"203",
    "ym_0":"13"
}

GET / POST - http://api1.5sim.net/stubs/handler_api.php?api_key=$api_key&action=getNumbersStatus&country=$country

Returns the number of available numbers

Request Parameters

Name Type Required Desc
api_key string Yes API-key
country number / string No Country number / Country name

List of available countries

Response

Name Type Desc
serviceName_{0/1} string The name of the service before the dash, after the designation of whether to enable redirection. 0 - do not enable. 1 - enable
total string Number of available numbers

Buy number

Request example

curl "http://api1.5sim.net/stubs/handler_api.php?api_key=$api_key&action=getNumber&service=$service&forward=$forward&operator=$operator&country=$country"
import requests

api_key = 'Your token'
country = 0
service = 'hn'
forward = 0
operator = 'megafon'

params = (
    ('api_key', api_key),
    ('country', country),
    ('action', 'getNumber'),
    ('service', service),
    ('forward', forward),
    ('operator', operator)
)

response = requests.get('http://api1.5sim.net/stubs/handler_api.php', params=params)
<?php

$api_key = 'Your token';
$ch = curl_init();
$country = 0;
$action = 'getNumbersStatus';
$service = 'hn';
$forward = 0;
$operator = 'megafon';

curl_setopt($ch, CURLOPT_URL, 'http://api1.5sim.net/stubs/handler_api.php?api_key=' . $api_key . '&country =' . $country  . '&action=' . $action . '&service=' . $service . '&forward=' . $forward . '&operator=' . $operator);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);

GET / POST - http://api1.5sim.net/stubs/handler_api.php?api_key=$api_key&action=getNumber&service=$service&forward=$forward&operator=$operator&country=$country

Orders a phone number for a specific service

Request Parameters

Name Type Required Desc
api_key string Yes API-key
service string Yes Ordering service
forward number No Enabling redirection. 0 (do not execute), 1 - (execute). The default value is 0
operator string No The name of the operator. Accepted values: mts, beeline, any, where any is any operator). Optional parameter, default is any
country number / string No Country number / Country name

List of available services

List of available countries

List of available operators

Response

Set status

Request example

curl "http://api1.5sim.net/stubs/handler_api.php?api_key=$api_key&action=setStatus&status=$status&id=$id&forward=$forward"
import requests

api_key = 'Your token'
id = 1
status = 1
forward = 0

params = (
    ('api_key', api_key),
    ('id', id),
    ('action', 'setStatus'),
    ('status', status),
    ('forward', forward)
)

response = requests.get('http://api1.5sim.net/stubs/handler_api.php', params=params)
<?php

$api_key = 'Your token';
$ch = curl_init();
$action = 'setStatus';
$id= 1;
$forward = 0;
$status = 1;

curl_setopt($ch, CURLOPT_URL, 'http://api1.5sim.net/stubs/handler_api.php?api_key=' . $api_key . '&id =' . $id . '&action=' . $action . '&forward=' . $forward . '&status=' . $status);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);

GET / POST - http://api1.5sim.net/stubs/handler_api.php?api_key=$api_key&action=setStatus&status=$status&id=$id&forward=$forward

Set activation status of the number

Request Parameters

Name Type Required Desc
api_key string Yes API-key
id string Yes Activation ID
forward number Yes / Нет The phone number to be forwarded to. Required only if the forward=1 parameter was passed in getNumber
status string No Activation status

Possible activation statuses:

Response

Get order status

Request example

curl "http://api1.5sim.net/stubs/handler_api.php?api_key=$api_key&action=getStatus&id=$id"
import requests

api_key = 'Your token'
id = 1

params = (
    ('api_key', api_key),
    ('id', id),
    ('action', 'getStatus')
)

response = requests.get('http://api1.5sim.net/stubs/handler_api.php', params=params)
<?php

$api_key = 'Your token';
$ch = curl_init();
$action = 'getStatus';
$id= 1;

curl_setopt($ch, CURLOPT_URL, 'http://api1.5sim.net/stubs/handler_api.php?api_key=' . $api_key . '&id =' . $id . '&action=' . $action);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);

GET / POST - http://api1.5sim.net/stubs/handler_api.php?api_key=$api_key&action=getStatus&id=$id

Return order status

Request Parameters

Name Type Required Desc
api_key string Да API-key
id string Да Order ID

Response

Prices

Request for prices

Request example

curl "http://api1.5sim.net/stubs/handler_api.php?api_key=$apikey&action=getPrices"
import requests

api_key = 'Your token'

params = ( ('api_key', api_key), ('action', 'getPrices') )

response = requests.get('http://api1.5sim.net/stubs/handler_api.php', params=params)

<?php

$api_key = 'Your token'; $ch = curl_init(); $action = 'getPrices';

curl_setopt($ch, CURLOPT_URL, 'http://api1.5sim.net/stubs/handler_api.php?api_key=' . $api_key . '&action=' . $action); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

$result = curl_exec($ch); if (curl_errno($ch)) { echo 'Error:' . curl_error($ch); } curl_close($ch);

GET / POST - http://api1.5sim.net/stubs/handler_api.php?api_key=$apikey&action=getPrices

Returns product prices

Request Parameters

Name Type Required Desc
api_key string Yes API-key

Response

Response example

{
  "russia":{
    "telegram":{
      "beeline":{
        "cost":8,
        "count":0
      },
      "matrix":{
        "cost":8,
        "count":0
      },
      "megafon":{
        "cost":8,
        "count":0
      },
      "mts":{
        "cost":8,
        "count":0
      },
      "rostelecom":{
        "cost":8,
        "count":0
      },
      "tele2":{
        "cost":8,
        "count":0
      },
      "virtual15":{
        "cost":8,
        "count":0
      },
      "yota":{
        "cost":8,
        "count":0
      }
    }
  }
}

Request prices by country

Request example

curl "http://api1.5sim.net/stubs/handler_api.php?api_key=$apikey&action=getPrices&country=russia"
import requests

api_key = 'Your token'
country = 0

params = (
    ('api_key', api_key),
    ('country', country),
    ('action', 'getPrices')
)

response = requests.get('http://api1.5sim.net/stubs/handler_api.php', params=params)
<?php

$api_key = 'Your token';
$ch = curl_init();
$country = 0;
$action = 'getPrices';

curl_setopt($ch, CURLOPT_URL, 'http://api1.5sim.net/stubs/handler_api.php?api_key=' . $api_key . '&country =' . $country  . '&action=' . $action);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);

GET / POST - http://api1.5sim.net/stubs/handler_api.php?api_key=$apikey&action=getPrices&country=russia

Returns product prices by country

Request Parameters

Name Type Required Desc
api_key string Yes API-key
country number / string Yes Country number / Country name

List of available countries

Response

Response example

{
  "russia":{
    "1688":{
      "beeline":{
        "cost":4,
        "count":1260
      },
      "lycamobile":{
        "cost":4,
        "count":935
      },
      "matrix":{
        "cost":4,
        "count":0
      }
    }
  }
}

Request for a price for a product

Request example

curl "http://api1.5sim.net/stubs/handler_api.php?api_key=$apikey&action=getPrices&service=vkontakte"
import requests

api_key = 'Your token'
service = 'vkontakte'

params = (
    ('api_key', api_key),
    ('action', 'getPrices'),
    ('service', service)
)

response = requests.get('http://api1.5sim.net/stubs/handler_api.php', params=params)
<?php

$api_key = 'Your token';
$ch = curl_init();
$action = 'getPrices';
$service= 'vkontakte';

curl_setopt($ch, CURLOPT_URL, 'http://api1.5sim.net/stubs/handler_api.php?api_key=' . $api_key . '&action=' . $action . '&service=' . $service);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);

GET / POST - http://api1.5sim.net/stubs/handler_api.php?api_key=$apikey&action=getPrices&service=vkontakte

Returns prices for a specific product

Request Parameters

Name Type Required Desc
api_key string Yes API-key
service string Yes Service name

List of available services

Response

Response example

{
  "telegram":{
    "afghanistan":{
      "virtual18":{
        "cost":4,
        "count":1260
      },
      "virtual23":{
        "cost":4,
        "count":935
      },
      "virtual4":{
        "cost":4,
        "count":0
      }
    }
  }
}

Request price by country and product

Request example

curl "http://api1.5sim.net/stubs/handler_api.php?api_key=$apikey&action=getPrices&country=russia&service=vkontakte"
import requests

api_key = 'Your token'
country = 0
service = 'vkontakte'

params = (
    ('api_key', api_key),
    ('country', country),
    ('service', service),
    ('action', 'getPrices')
)

response = requests.get('http://api1.5sim.net/stubs/handler_api.php', params=params)
<?php

$api_key = 'Your token';
$ch = curl_init();
$action = 'getPrices';
$country = 0;
$service = 'vkontakte';

curl_setopt($ch, CURLOPT_URL, 'http://api1.5sim.net/stubs/handler_api.php?api_key=' . $api_key . '&country  =' . $country  . '&action=' . $action . '&service  =' . $service);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);

GET / POST - http://api1.5sim.net/stubs/handler_api.php?api_key=$apikey&action=getPrices&country=russia&service=vkontakte

Returns product prices by country and specific product

Request Parameters

Name Type Required Desc
api_key string Yes API-key
service string Yes Service name
country number / string Yes Country number / Country name

List of available services

List of available countries

Response

Response example

{
  "russia":{
    "telegram":{
      "beeline":{
        "cost":8,
        "count":0
      },
      "matrix":{
        "cost":8,
        "count":0
      },
      "megafon":{
        "cost":8,
        "count":0
      },
      "mts":{
        "cost":8,
        "count":0
      },
      "rostelecom":{
        "cost":8,
        "count":0
      },
      "tele2":{
        "cost":8,
        "count":0
      },
      "virtual15":{
        "cost":8,
        "count":0
      },
      "yota":{
        "cost":8,
        "count":0
      }
    }
  }
}

Balance

Balance request

Request example

curl "http://api1.5sim.net/stubs/handler_api.php?api_key=$api_key&action=getBalance"
import requests

api_key = 'Your token'

params = ( ('api_key', api_key), ('action', 'getBalance') )

response = requests.get('http://api1.5sim.net/stubs/handler_api.php', params=params)

<?php

$api_key = 'Your token'; $ch = curl_init(); $action = 'getBalance';

curl_setopt($ch, CURLOPT_URL, 'http://api1.5sim.net/stubs/handler_api.php?api_key=' . $api_key . '&action=' . $action); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

$result = curl_exec($ch); if (curl_errno($ch)) { echo 'Error:' . curl_error($ch); } curl_close($ch);

GET / POST - http://api1.5sim.net/stubs/handler_api.php?api_key=$api_key&action=getBalance

Returns user balance

Request Parameters

Name Type Required Desc
api_key string Yes API-key

Response

Countries

Available countries

Country number

You can also use the full name of the country:

Services

Available services

You can also use the full name of the service:

Operators

Available operators