合作伙伴协议旨在通过 API 直接向 SMSBOWER 服务器提供电话号码和传入的短信 .
所有请求都包含参数 - KEY。此密钥由支持人员提供,可在个人账户中使用 .
数量请求 GET_SERVICES, 号码请求 GET_NUMBER 和激活完成
FINISH_ACTIVATION 直接从我们的服务器发送到合作伙伴的服务器 .
格式 URL — https://SMSBOWER 其中 SMSBOWER 可以是 partner.ru:port/SMSBOWER 或 partner.ru/SMSBOWER.php
要求
字段类型:
This request provides us with information about the quantity of phone number for services available for sale .
该POST请求从SMSBOWER服务器传输至合作伙伴服务器。 .
! 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 | 协议密钥 |
字段 (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"
}
该请求向我们提供一个电话号码,我们将此号码转交给客户。 .
该POST请求从SMSBOWER服务器传输至合作伙伴服务器。 .
若exceptionPhoneSet数组包含前缀列表(例如44742和44740),则不得提供以这些前缀中任意一个开头的号码。号码的位数不受前缀长度的限制。 不得 提供一个以这些前缀中任意一个开头的号码。号码的位数不受前缀长度的限制。 .
字段 (Field) | 类型 (Type) | 是否必填 (Required) | 描述 (Description) |
action | String | GET_NUMBER | |
key | String | 状态表 | |
country | String | 状态表 | |
service | String | 状态表 | |
operator | String | 协议密钥 | |
sum | Cur | 成功注册服务后您将获得的金额 | |
exceptionPhoneSet | Array | 禁止使用的前缀列表 禁止使用 |
字段 (Field) | 类型 (Type) | 是否必填 (Required) | 描述 (Description) |
status | String | Status of the response (see 状态表) | |
number | Ulong | 带国家代码的电话号码 | |
activationId | Ulong | 合作伙伴系统中的激活ID | |
call | String | 该号码是否支持闪存呼叫(Flash call available for number) | |
voice | String | 该号码是否支持语音呼叫(Voice call available for number) |
{
"action": "GET_NUMBER",
"key": "qwerty123",
"country": "russia",
"operator": "beeline",
"service": "tg",
"sum": "20.00"
}
{
"number": "79156537788",
"activationId": "36532",
"status": "SUCCESS",
"call": "1",
"voice": "1"
}
{
"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 | 协议密钥 | |
smsId | Ulong | 合作伙伴系统中的短信ID | |
phone | Ulong | 接收短信的电话号码(含国家代码) | |
phoneFrom | String | 短信发送方名称(可为字母数字或纯数字形式) | |
text | String | SMS text | |
voice | Boolean | 该请求为闪存呼叫(Flash call) | |
call | Boolean | 该请求为语音呼叫(Voice call) |
字段 (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"
"call": "0",
"voice": "0"
}
{
"action": "PUSH_SMS",
"key": "qwerty123",
"smsId": 1,
"phone": 447472190082,
"phoneFrom": "446756540011",
"text": "446756540011"
"call": "1",
"voice": "0"
}
{
"action": "PUSH_SMS",
"key": "qwerty123",
"smsId": 1,
"phone": 447472190082,
"phoneFrom": "446756540011",
"text": "12345"
"call": "0",
"voice": "1"
}
{
"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 | 协议密钥 | |
activationId | Ulong | 第二次请求中获取的激活ID | |
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 .
号码的同步发放
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 .
正确的激活完成
The change in activation status is fully controlled by SMSBOWER. The partner server should 不得 autonomously complete activations.
短信投递验证
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 .
字段类型验证
Thoroughly check the field types, specified in this documentation. If this condition is violated, the testing fails .
电话号码中的国家代码
Phone number issuance should be in digital format and include the country code .
号码下发时间验证
You must issue numbers with a delay of less than 3 seconds. If it takes more than 3 seconds, the testing fails .
号码数量验证
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 .
异常处理验证
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 |
* The mechanism for cancellation works as follows: If a phone number has been canceled 5 times, you should not issue the same number again. It's possible that the number was not suitable for the client or was already registered for the specific service.
{
"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.org /api#countries.
运营商列表
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.org /api#services