Get information on numbers with active operations
GEThttps://onlinesim.io/api/getState.php
Returns the operations of your account with their status and received SMS — the "My numbers" section of the
dashboard. tzid limits the answer to one operation. POST with the same parameters works too.
msgholds the current SMS: the code by default, the full text withmessage_to_code=0, all SMS withmsg_list=1. setOperationRevise moves the current SMS to the next one.- Answers are cached for 5 seconds: the same request repeated sooner gets the same answer. Without
tzid, a setOperationRevise call can therefore show up only after that time.


Security
Parameters
query10
| Name | Type | Description |
|---|---|---|
tzid | integer | Operation ID: return only this operation |
message_to_code | integer |
Enum: 012Default:1 |
orderby | string | Order of the operations in the list by operation ID: Enum: ascdescDefault:desc |
msg_list | integer |
Enum: 01Default:0 |
clean | integer | Only with |
last | integer | Only with Enum: 01Default:0 |
number | boolean | With this parameter (any value, even |
with_response | integer |
Enum: 01Default:0 |
text | integer | Only with Enum: 01Default:0 |
lang | string | Language of the texts in the answer (country and service names, status texts): Enum: frderuenzh |
Responses
200Operations or an error
application/jsonschemaoneOf
[0]object[]Operations of the account (never empty: without operations the answer is ERROR_NO_OPERATIONS)
[1]objectWith with_response
tzid and text: the msg of that operation alone[3]object
[4]object
Examples
One operation with an SMS
[
{
"country": 373,
"sum": 0.36,
"service": "telegram",
"number": "+37360000000",
"webhook_url": null,
"subscription_package_id": null,
"response": "TZ_NUM_ANSWER",
"tzid": 10000,
"time": 596,
"msg": "123456",
"form": "index"
}
]No operations
{
"response": "ERROR_NO_OPERATIONS"
}429HTTP 429: more than 400 requests per minute from one profile (from one IP for requests without a key), or more than 200 requests per minute from one profile to getNum, getPrice, getState and setOperationOk together
application/jsonschemaobject
Examples
Request rate limit exceeded
{
"response": "TRY_AGAIN_LATER"
}456HTTP 456: the API key is invalid or the OAuth token has expired. Public methods answer the same way when an invalid key is sent
application/jsonschemaobject
Examples
Invalid API key or expired token
{
"response": "ERROR_WRONG_KEY"
}