Onlinesim API

1.0

General description

This API will allow you to access all services provided by Onlinesim:

  • SMS receiving from a single specific service on a virtual number;
  • rent a number to receive SMS from multiple different senders (apps/websites/mobile numbers);
  • mobile proxy service;
  • you can also use our free numbers to test the service before the purchase.

This API is available for registered Onlinesim users only!
You need to have Onlinesim profile to be able to access this API. Several methods of authentication are available (Authentication), but we will use API key authentication in this documentation for reasons of simplicity.

List of API requests

Requests are specific for each service and allocated in corresponding sections:

Profile section

These requests are related to the profile or all the services provided by Onlinesim:

  • getBalance - returns currently available balance of your profile, frozen balance and income from the referral program.
  • webhook - allows you to set a URI to which all the messages from your active operations will be forwarded to. This includes both single-service and long term rental.

Single-service activations section

Allows you to order a number to receive an unlimited amount of SMS within 15 minutes from a single service. Please note that you won't be able to change service during the operation, in order to change it, you will have to order a new number for the specified service.

  • getTariffs - returns a quantity of available numbers for each service and country (if specified);
  • getNum - reserves a number for a particular service, allowing to receive SMS messages from it;
  • getState - returns detailed information on all active numbers of the profile (including received messages);
  • setOperationRevise - requests next received by the specified number SMS from the queue, if first one didn't have the right code and/or expected information;
  • setOperationOk - sets operation status as successful and closes the operation.

Rent section

This service implies that the number will be used to receive SMS from different senders (including other mobile numbers) aside banks, payment systems, credit institutions, etc. For detailed information please check Public offer.

  • tariffsRent - returns a list of countries with detailed information on rental plans;
  • getRentNum - orders a number of a chosen country for rent for a certain period;
  • getRentState - returns a list of numbers of your profile with current active rent and received messages;
  • extendRentState - prolongs the rent of a given number;
  • closeRentNum - closes the rental number.

Free numbers

This API allows you to access the functions to use free Onlinesim numbers available on the home page of our website.

You can use these numbers for testing, but please note that the quantity of available numbers as well as list of available countries are limited. It is also worth noting that the messages that were sent to free numbers are not private and available to all users.

There is one general request that allows you to access free numbers:

  • getFreeList - returns detailed information on available list of countries, free numbers and messages they've received.

Each request has its own description, type, endpoint's URL, parameters, request and response schemas. Some responses can have examples of specific errors that might appear. Responses are represented in JSON or TXT format based on method called and results.

Common exceptions

Result Description
ACCOUNT_BLOCKED Account has been banned
ERROR_WRONG_KEY API key is invalid or incorrect
ERROR_NO_KEY API key is missing
ERROR_NO_SERVICE Service name is invalid or missing
REQUEST_NOT_FOUND Method called is invalid or missing
API_ACCESS_DISABLED API disabled
API_ACCESS_IP Access from this IP-address is disabled in the profile
WARNING_LOW_BALANCE Not enough funds to buy the service

Servers