gethttp://api-conserver.onlinesim.io/stubs/handler_api.php?action=getNumber

GET /stubs/handler_api.php?action=getNumber

Buy virtual number for selected service

This request allows you to order a phone number of a specific country to receive SMS from a selected service. This is the main service provided by Onlinesim: you can use virtual numbers to receive verification codes or any other information contained in SMS messages.

Security

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

Parameters

query4
NameTypeDescription
action*string

Method name, in this case getNumber

Enum:getNumberDefault:getNumber
service*string

Service slug (short service name, required upon ordering a number, according to getNumbersStatus response)

Example:3223
country*integer

Country ID (according to getCountries response)

Default:7Example:46
phoneExceptiononeOf

Array for mask exception (including the country code)

For example: with value 911,912123 won''t issue numbers of India, that start with 911* and 912123*

Example:908

Responses

200

Successful getNumber response from the server: either returns an operation ID and issued number for SMS receiving or throws an exception.

Content-Typetext/html
Schema
Responsestring

ACCESS_NUMBER:OPERATION_ID:ISSUED_NUMBER (in international format)

Example:ACCESS_NUMBER:10000:46050608210

Examples

getNumber example response
ACCESS_NUMBER:65904893:79910000000

Code Samples

Generating examples...