The API is the protocol that allows communication between your software and our activation server.
API is needed for automatization of the SMS, OTP and PVA receiving process on your side.
Our API is fully compatible with competitor sites.
All requests must have an API key as a parameter 'api_key'
Parameters $api_key - Your API Key
Answer
ACCESS_BALANCE:account balance
Possible mistakes
BAD_KEY - invalid API key
Answer
ACCESS_BALANCE:$yourBalance
Parameters $api_key - Your API Key $service - service see table $country - country number see table $maxPrice - the maximum price for which you are ready to buy a number $providerIds - a list of providers from which purchases will be made, separated by commas (1,2,3) $exceptProviderIds - a list of providers excluded from the number purchase, separated by commas (1,2,3) $phoneException - excluding prefixes for numbers. Separate with commas. Record format: country code and 3 to 6 digits of the mask (e.g. 7918,7900111) $ref - transfer the referral ID By getting the number through the API, you agree with the project rules
Answer ACCESS_NUMBER:$activationId:$phoneNumber
Possible mistakes BAD_KEY - invalid API key BAD_ACTION - incorrect action BAD_SERVICE - incorrect service name
Parameters $api_key - Your API Key $id - id activation
Answer
STATUS_WAIT_CODE - Waiting for SMS
STATUS_WAIT_RESEND - Waiting for next sms
STATUS_CANCEL - Activation canceled
STATUS_OK: 'activation code' - code received
Possible mistakes
BAD_KEY - invalid API key
BAD_ACTION - incorrect action
NO_ACTIVATION - incorrect activation id
Simple logic of API chronology:
Get number using getNumber method after that the following actions are available: 8 - Cancel the activation (if the number does not match you) 1 - Report that SMS has been sent (optional)
To activation with status 1: 8 - Cancel activation
Immediately after receiving the code: 3 - Request another SMS 6 - Confirm SMS code and complete activation
To activation with status 3: 6 - Confirm SMS code and complete activation
Answer ACCESS_READY - phone is ready for getting SMS ACCESS_RETRY_GET - waiting for a new SMS ACCESS_ACTIVATION - the service has been successfully activated ACCESS_CANCEL - activation canceled
Possible mistakes
NO_ACTIVATION - incorrect activation id
BAD_SERVICE - incorrect service name
BAD_STATUS - incorrect status
BAD_KEY - invalid API key
BAD_ACTION - incorrect action
EARLY_CANCEL_DENIED - It is possible to cancel the number after 2 minutes following the purchase
Parameters $api_key - Your API Key $service - name of the service (Optional, by default all services) see table $country - code name (Optional, defaults to all countries) see table
Answer
JSON - object in format
{''Country'':
{''Service'':
{
''cost'':Cost,'
'count'':Count
}
}
}
This method works similarly to the method getNumber takes the same parameters but returns additional activation information.
Parameters api_key - Your API Key $service - service see table $country - country number see table $maxPrice - the maximum price for which you are ready to buy a number $providerIds - a list of providers from which purchases will be made, separated by commas (1,2,3) $exceptProviderIds - a list of providers excluded from the number purchase, separated by commas (1,2,3) By getting the number through the API, you agree with the project rules
If the request is successful, the response will be in the following format.
{
"activationId": "id",
"phoneNumber": number,
"activationCost": activationCost,
"countryCode": countryCode,
"canGetAnotherSms": canGetAnotherSms,
"activationTime": activationTime,
"activationOperator": activationOperator,
}
Possible mistakes BAD_KEY - invalid API key BAD_ACTION - incorrect action BAD_SERVICE - incorrect service name
Parameters api_key - Your API Key $service - service see table $country - country number see table
"country": {
"service": {
"price1": count,
"price2": count,
"price3": count,
}
},
Possible mistakes BAD_KEY - invalid API key BAD_ACTION - incorrect action BAD_SERVICE - incorrect service name
Parameters api_key - Your API Key $service - service see table $country - country number see table
"country": {
"service": {
"provider 1 id": {
count: count,
price: price,
provider_id: provider id,
},
"provider 2 id": {
count: count,
price: price,
provider_id: provider id,
},
"provider 3 id": {
count: count,
price: price,
provider_id: provider id,
},
}
},
Possible mistakes BAD_KEY - invalid API key BAD_ACTION - incorrect action BAD_SERVICE - incorrect service name BAD_COUNTRY - incorrect country name