GEThttps://onlinesim.io/api/getNum.php

Buy a virtual number for a selected service

Requests a phone number for a particular service, allowing to receive SMS messages from it.

Allows you to order a number of a specified country to receive SMS from the website/app that you want.

This request in fact plays the same role as the "Buy number" button located on the user dashboard.

Security

OAuth2
sms-scope
grants access to manage numbers for the SMS receiving service from Onlinesim

Parameters

query6
NameTypeDescription
service*string

Service names according to the service list

country*string

Country code (according to countries list)

rejectstring[]
dev_idinteger

Account ID for software developers (Onlinesim profile's ID)

numberboolean

Flag for displaying detailed information about the operation in the server response. When the value true is passed, the request will return the ordered phone number in the response, as well as a number of additional reference fields

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:ru

Responses

200

Successful response for getNum request: the server issues a dedicated virtual number for specified service or throws an exception

Content-Typeapplication/json
Schema
schemaoneOf
One Of
[0]allOf
[1]object
[2]object

Examples

Successful getNum response

Successful number issuance

{
  "response": 1,
  "tzid": 10000
}

Code Samples

Generating examples...