Alternative API

1.0

General description

Alternative API for integration with Onlinesim.

This API will allow you to access two main services of Onlinesim: rent numbers to receive SMS from multiple different senders and receiving SMS from a single specific service.

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 (see Authorization), but we will use API key authentication in this documentation for reasons of simplicity.

Receiving messages from payment services, banks, and other financial institutions is not available on our platform. For more detailed information, including a list of such services, please refer to the Public Offer.

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 both services provided by Onlinesim

  • getBalance - returns current balance of your Profile;
  • getCountries - returns a list of countries and general information on what services are available.

Single-service activations section

Allows you to order a number to receive an unlimited number of SMS from a single service within a short time window (15 minutes for most of the services). Please note that you cannot change the service during the operation. To receive SMS from different services, you will need to order new numbers with the appropriate parameters.

  • getNumbersStatus - requests a list of available numbers grouped by country and service;
  • getNumber - orders a number of a chosen country and service to receive SMS;
  • getStatus - returns a list of received SMS activation codes;
  • getFullSms - returns a list of received SMS with full text;
  • setStatus - set a status of the operation (cancel an order, close the operation prematurely, etc).

Rent section

This service implies that the number will be used to receive SMS from multiple different senders (including SMS from other mobile numbers), except for those that are prohibited.

Postman collection available here:

Run In Postman

Postman documentation

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

Common errors for all API methods in TXT format.

TEXT_ERROR

TEXT_ERROR Description
BAD_KEY API key is invalid or missing
BAD_ACTION Unhandled exception

Servers