The partner protocol is designed to provide phone numbers and incoming SMS messages via API directly to the SMSBOWER server.
All requests include the parameter - KEY. This key is provided by support staff and is available in the personal account.
Quantity requests GET_SERVICES, number requests GET_NUMBER and activation completion
FINISH_ACTIVATION are sent directly from our server to the partner's server.
Format URL — https://SMSBOWER where SMSBOWER can be partner.ru:port/SMSBOWER or partner.ru/SMSBOWER.php
Requirements
Field types:
This request provides us with information about the quantity of phone number for services available for sale.
The POST request is transmitted from the SMSBOWER server to the partner's server.
! Please note: If your GSM modem is limited in the number of concurrently active modules, you should provide a count equal to the number of active modules.
Field | Type | Required | Description |
action | String | GET_SERVICES | |
key | String | Protocol key |
Field | Type | Required | Description |
status | String | Status of the response (see 状态表) | |
countryList | Array | 国家列表 |
Field | Type | Required | Description |
country | String | Status of the response (see Status Table) | |
operatorMap* | Associative array | Key - operator (see 数据表), value - associative array of services** |
{
"action": "GET_SERVICES",
"key": "qwerty123"
}
{
"countryList":
[
{
"country": "russia",
"operatorMap":
{
"beeline":
{
"ok": 15,
"wa": 20
},
"megafon":
{
"vk": 3,
"ok": 10
}
}
},
{
"country": "ukraine",
"operatorMap":
{
"life":
{
"vk": 0,
"wa": 32
}
}
}
],
"status": "SUCCESS"
}
This request provides us with a phone number that we pass on to the client.
The POST request is transmitted from the SMSBOWER server to the partner's server.
If the exceptionPhoneSet array contains a list of prefixes, for example 44742 and 44740, you should not provide a number that starts with any of these prefixes. The number of digits is not limited by the size of the prefix.
Field | Type | Required | Description |
action | String | GET_NUMBER | |
key | String | Data Table | |
country | String | Data Table | |
service | String | Data Table | |
operator | String | Protocol key | |
sum | Cur | The amount you will receive for a successfully registered service | |
exceptionPhoneSet | Array | List of prefixes that are PROHIBITED |
Field | Type | Required | Description |
status | String | Status of the response (see 状态表) | |
number | Ulong | Phone number with country code | |
activationId | Ulong | Activation ID in the partner's system |
{
"action": "GET_NUMBER",
"key": "qwerty123",
"country": "russia",
"operator": "beeline",
"service": "tg",
"sum": "20.00"
}
{
"number": "79156537788",
"activationId": "36532",
"status": "SUCCESS"
}
{
"action": "GET_NUMBER",
"key": "qwerty123",
"country": "russia",
"operator": "any",
"service": "vk",
"sum": "10",
"exceptionPhoneSet":
[
"7918",
"79281",
]
}
This POST request is sent from the partner's server to the SMSBOWER server at the address: https://smsbower.online/agent/api/sms
If you receive a response with the status SUCCESS, mark the SMS as successfully delivered in your database and do not send it again. If a status other than SUCCESS is returned, repeat the request with a 10- second delay until you receive a SUCCESS status.
Field | Type | Required | Description |
action | String | PUSH_SMS | |
key | String | Protocol key | |
smsId | Ulong | ID of the SMS in the partner's system | |
phone | Ulong | Phone number (including the country code) to which the SMS was sent | |
phoneFrom | String | The sender's name (may be either alphanumeric or numeric) which sent the SMS | |
text | String | SMS text |
Field | Type | Required | Description |
status | String | Status of the response (see 状态表) |
{
"action": "PUSH_SMS",
"key": "qwerty123",
"smsId": 1,
"phone": 447472190082,
"phoneFrom": "Microsoft",
"text": "Microsoft access code: 5015"
}
{
"status": "SUCCESS"
}
This request is transmitted from the SMSBOWER server to the partner's server to complete activation.
POST request initiated from the SMSBOWER to the partner's server.
Activation management is fully controlled by SMSBOWER. Due to factors beyond our control, we may not receive a response from you regarding a successful status change. Therefore, if SMSBOWER sends a repeat activation completion request, you should check for the existence of the activation ID on your end. If the activation exists, send a status of SUCCESS in response.
Field | Type | Required | Description |
action | String | FINISH_ACTIVATION | |
key | String | Protocol key | |
activationId | Ulong | Activation ID obtained in the second request | |
status | Unit | Status of the response (see 状态表) |
Field | Type | Required | Description |
status | String | Status of the response (see 状态表) |
{
"action": "FINISH_ACTIVATION",
"key": "qwerty123",
"activationId": 100,
"status": 3,
}
{
"status": "SUCCESS"
}
After implementing the protocol, you need to contact our technical support team, provide the URL, and our staff will conduct testing. If the verification passes all parameters successfully, you will be successfully connected to SMSBOWER.
Simultaneous Number Issuance
You should handle simultaneous requests properly and not issue numbers repeatedly. For example, if you have 100 numbers for Telegram United Kingdom, and SMSBOWER simultaneously makes 100 requests for Telegram United Kingdom, the partner server should provide 100 unique numbers. If a number is issued multiple times, the test fails.
Correct Activation Completion
The change in activation status is fully controlled by SMSBOWER. The partner server should not autonomously complete activations.
SMS Delivery Verification
Once you receive an SMS, you must immediately forward it to the SMSBOWER server. If you receive a status of SUCCESS, you should not forward the SMS again. However, if you receive a different status, you should retry the request every 10-20 seconds. If an SMS is issued again after receiving a SUCCESS status, the test fails.
Field Type Verification
Thoroughly check the field types, specified in this documentation. If this condition is violated, the testing fails.
Country Code in Phone Number
Phone number issuance should be in digital format and include the country code.
Number Issuance Time Verification
You must issue numbers with a delay of less than 3 seconds. If it takes more than 3 seconds, the testing fails.
Number Quantity Verification
If you issue 1000 numbers in a request for quantity of numbers, but only 100 are issued at the same time, then testing has failed.
Exception Handling Verification
If you incorrectly handle exceptions for issuing a number, then testing has failed.
状态 | Description |
SUCCESS | The request was finished successfully |
ERROR | Error during request execution. The ERROR field should be filled with a description |
NO_NUMBER | No numbers are available. This response is only returned for a request number. |
状态 | Description |
1 | Issuing a number for this service is prohibited |
3 | Activation was successfully sold. You have received a reward |
4 | Activation was canceled* |
5 | Activation has been returned. The customer has been refunded for the activation. It's possible that this number was previously registered, and two-factor authentication may be enabled on the number |
{
"status": "SUCCESS",
//Information
}
{
"status": "ERROR",
"error": "Description of the error"
}
国家列表
The full list of countries with names and IDs can be found at the link https://smsbower.net/api#countries.
List of operators
At the moment, the breakdown by operators is under development, so you should pass the value any. Once this functionality is implemented, we will notify you through the technical support chat.
服务列表
The full list of services with names and IDs can be found at the link https://smsbower.net/api#services