GET /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.
WARNING
You can also specify additional parameters such as masks for exception in case if the service has specific requirements.
Some websites and applications might block numbers with certain digit sequence (masks) from registration.
In this case, this parameter might come in handy.
Security
- apikey
- BearerAuth
- OAuth2 (Scopes: sms-scope)
sms-scope: grants access to manage numbers for the SMS receiving service from Onlinesim
Parameters
| Name | Type | Description |
|---|---|---|
service* | string | Service name (can only accept values of services in Example: facebook |
country | integer≥ 1 | ‘International dialing code of the country (Е.164 standard, without Default: 7Example:46 |
reject | string[] | Array for mask exception (including country code) Example: when [911, 912123] is passed, the server won’t issue numbers of India, that starts with +911* and +912123*. Example: ["911"] |
dev_id | integer | Account ID for software developers (Onlinesim profile’s ID). Example: 100000 |
number | boolean | ‘Display number in response. If Example: false |
lang | string | Response language: Enum: frderuenzhDefault:ruExample:en |
Responses
200
Successful response for getNum request: the server issues a dedicated virtual number for specified service or throws an exception.
Code Samples
No code samples available