Skip to content

GET /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

  • apikey
  • BearerAuth
  • OAuth2 (Scopes: sms-scope)
    • sms-scope: grants access to manage numbers for the SMS receiving service from Onlinesim

Parameters

NameTypeDescription
tzidinteger
≥ 1

Operation ID

Example:10000
message_to_codeinteger

'SMS display mode:

0 - show the entire SMS,

1 - display only the code from the SMS’

Enum:01Example:1
orderbystring

'Sorting order:

asc - ascending;

desc - descending’

Enum:ascdescDefault:ascExample:asc
msg_listinteger
≥ 0, ≤ 1

'Message list display mode:

0 - show only the active message,

1 - show the whole list’

Enum:01Example:1
cleaninteger
≥ 0, ≤ 1

'Message display mode (only for msg_list = 0):

0 - show previosly shown messages,

1 - do not show previously shown messages’

Enum:01Example:1
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:ruExample:en

Responses

200

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

Code Samples