GEThttps://onlinesim.io/api/getState.php

Get information on numbers with active operations

Returns detailed information on all active numbers you have (or specific one).

It allows you to check the status of operations of your account and read the messages received on ordered numbers.

For example, you can use this request to get a list of all SMS from active numbers to process them.

In fact, this is a representation of active operations section ("My numbers") from the user dashboard.

Active operations

Security

OAuth2
sms-scope
grants access to manage numbers for the SMS receiving service from Onlinesim

Parameters

query6
NameTypeDescription
tzidstring

Operation ID, returned by the server when a number is issued (in response to a getNum or getRentNum request). The list of active operations of the profile with their IDs can also be obtained via getState - for receiving operations, and via getRentState - for rental operations. If the operation ID is not passed, the response will contain data on all operations

message_to_codeinteger

SMS display mode:

0 - show the entire SMS,

1 - display only the code from the SMS

Enum:01Default:1
orderbystring

Sort order of SMS messages by their time of receipt:

asc - sorting from oldest to newest;

desc - sorting from newest to oldest

Enum:ascdescDefault:desc
msg_listinteger

SMS message list display mode:

0 - only the active message,

1 - as a list of all incoming messages

Enum:01
cleaninteger
≥ 0, ≤ 1

Message display mode (only for msg_list = 0):

0 - show previosly shown messages,

1 - do not show previously shown messages

Enum:01
langstring

Response language:

fr - French,

de - German,

ru - Russian,

en - English,

zh - Chinese.

Please note that the translation applies only to string field values, such as service names or country names. Field names themselves, error messages, and standard values (for example, true/false for boolean fields) remain in English

Enum:frderuenzhDefault:ru

Responses

200

Successful response for getState request: the server returns detailed information on active numbers of your account or throws an exception

Content-Typeapplication/json
Schema
schemaoneOf

Successful response (plain array or wrapped with the response field) or an error (method-specific or common)

One Of
[0]object[]

List of active operations. An empty array if there are none (in some cases the server returns an error insted — see the components commonErrorResponse and getStateMethodError in the corresponding section)

[1]object
[2]object
[3]object

Examples

List of operations provided as an array

Success — array of operations

[
  {
    "tzid": 10000,
    "response": "TZ_NUM_WAIT",
    "number": "+37360000000",
    "country": 373,
    "service": "telegram",
    "sum": 14,
    "time": 596,
    "msg": "123456",
    "form": "index"
  }
]

Code Samples

Generating examples...