API Documentation - SMSBower
API

API Documentation

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 should https://smsbower.online/stubs/handler_api.php
POST or GET request.

All requests must have an API key as a parameter 'api_key'

Get Balance
https://smsbower.online/stubs/handler_api.php?api_key=$api_key&action=getBalance
Copied

Parameters $api_key - Your API Key

Answer
ACCESS_BALANCE:account balance

Possible mistakes
BAD_KEY - invalid API key

Answer
ACCESS_BALANCE:$yourBalance

Get phone number
https://smsbower.online/stubs/handler_api.php?api_key=$api_key&action=getN
umber&service=$service&country=$country&maxPrice=$maxPrice
&providerIds=$providerIds&exceptProviderIds$exceptProviderIds
&phoneException$phoneException&ref$ref
Copied

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

Get SMS code
https://smsbower.online/stubs/handler_api.php?api_key=$api_key&action=getStatus&id=$id
Copied

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

Change of activation status
https://smsbower.online/stubs/handler_api.php?api_key=$api_key&action=setSt
atus&status=$status&id=$id
Copied
Parameters $api_key - Your API Key $id - id activation $status - activation status
1 - inform about the readiness of the number (SMS sent to the number) 3 - request another code (free) 6 - complete activation * 8 - inform that the number has been used and cancel the activation

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

Get prices
https://smsbower.online/stubs/handler_api.php?api_key=$api_key&action=getP
rices&service=$service&country=$country
Copied

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
            }
        }
}
                                                
                                            

List of services
List of countries
Get phone numberV2

This method works similarly to the method getNumber takes the same parameters but returns additional activation information.

https://smsbower.online/stubs/handler_api.php?api_key=$api_key&action=getN
umberV2&service=$service&country=$country&maxPrice=$maxPrice
&providerIds=$providerIds&exceptProviderIds=$exceptProviderIds
Copied

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

Answer

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,
}
Copied

Possible mistakes BAD_KEY - invalid API key BAD_ACTION - incorrect action BAD_SERVICE - incorrect service name

Get full prices list v2
https://smsbower.online/stubs/handler_api.php?api_key=$api_key&action=getP
ricesV2&service=$service&country=$country
Copied

Parameters api_key - Your API Key $service - service see table $country - country number see table

Example of an answer
"country": {
    "service": {
            "price1": count,
            "price2": count,
            "price3": count,
          }
     },
            
Copied

Possible mistakes BAD_KEY - invalid API key BAD_ACTION - incorrect action BAD_SERVICE - incorrect service name

Get full prices list v3
https://smsbower.online/stubs/handler_api.php?api_key=$api_key&action=getP
ricesV3&service=$service&country=$country
Copied

Parameters api_key - Your API Key $service - service see table $country - country number see table

Example of an answer
"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,
          },
          }
     },
            
Copied

Possible mistakes BAD_KEY - invalid API key BAD_ACTION - incorrect action BAD_SERVICE - incorrect service name BAD_COUNTRY - incorrect country name

Write to us