profile (alt)

Get the list of countries

GEThttps://onlinesim.io/stubs/handler_api.php?action=getCountries

Returns all countries with their IDs. id is the country parameter of the other methods (sms-activate numbering: Russia 0, Ukraine 1, Kazakhstan 2, …).

The keys of the answer are positions in the list ("0", "1", …), not country IDs: use id.

No key is needed. The list is cached for 60 minutes.

Parameters

query1
NameTypeDescription
action*string

Method name: getCountries

Enum:getCountries

Responses

200Countries: position in the list → country
text/plain
Schema
schemastring
Error answered as text by every action (also by the JSON ones):
  • BAD_KEY — the API key is wrong or missing
  • BANNED — the account is blocked
  • BAD_ACTION — unknown action or an error without its own code (for example a temporary error or too many concurrent requests); check the request and repeat it later
  • Too many requests. Please wait a moment before trying again. — the converter's limit of getNumber, getRentNumber, setStatus and setRentStatus (3 requests per second, 150 per 30 seconds)
Enum:BAD_KEYBANNEDBAD_ACTIONToo many requests. Please wait a moment before trying again.
application/json
Schema
schemaobject
[additionalProperties]object

Examples

countries32 lines

Beginning of the list

[
  {
    "id": 0,
    "rus": "Россия",
    "eng": "Russia",
    "chn": "俄罗斯",
    "visible": 1,
    "retry": 0,
    "rent": 1,
    "multiService": 0
  },
  {
    "id": 1,
    "rus": "Украина",
    "eng": "Ukraine",
    "chn": "乌克兰",
    "visible": 1,
    "retry": 0,
    "rent": 0,
    "multiService": 0
  },
  {
    "id": 2,
    "rus": "Казахстан",
    "eng": "Kazakhstan",
    "chn": "哈萨克斯坦",
    "visible": 1,
    "retry": 0,
    "rent": 1,
    "multiService": 0
  }
]

Code Samples

Generating examples...