rent

Get the SMS of a rented number

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

Returns all SMS received by the rented number, newest first. Errors as JSON:

  • NO_ID_RENT — id is missing
  • INVALID_PHONE — no active rent with this id
  • STATUS_WAIT_CODE — no SMS yet

A non-numeric id gives BAD_ACTION (text).

Security

OAuth2
rent-scope
grants access to renting phone numbers from Onlinesim

Parameters

query2
NameTypeDescription
action*string

Method name: getRentStatus

Enum:getRentStatus
id*integer
≥ 1

Operation ID from getRentNumber or getRentList

Example:22867858

Responses

200Received SMS, or an error
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
schemaoneOf
One Of
[0]object
[1]objectError of a JSON action. The codes are listed at each action

Examples

sms

Received SMS

{
  "status": "success",
  "quantity": 1,
  "values": [
    {
      "phoneFrom": "7400123456",
      "text": "Your verification code is 070501",
      "service": "twitter",
      "date": "2026-11-19 10:05:00"
    }
  ]
}
wait

No SMS yet

{
  "status": "error",
  "message": "STATUS_WAIT_CODE"
}

Code Samples

Generating examples...