PNS API bind AXG - nxtele/nxcloud-doc-en GitHub Wiki
API Documentation: Bind AXG Number Relationship
Request URL
https://number.nxcloud.com/api/pns/
Request Headers
Parameter |
Type |
Required |
Description |
Example |
accessKey |
string |
Yes |
User's accessKey |
fme2na3kdi3ki |
action |
string |
Yes |
Request method |
bindAXG |
bizType |
string |
Yes |
[Business type] Fixed value to identify privacy number service |
5 |
ts |
string |
Yes |
Current timestamp of the request (in milliseconds). The maximum time difference allowed between the client and the server is 60 seconds. |
1655710885431 |
sign |
string |
Yes |
Signature of the API input parameters. Signature algorithm |
|
Request Body
Parameter |
Required |
Type |
Description |
phoneA |
Yes |
string |
Number A, the country code of A and B numbers must be the same; G can dial A after binding |
phoneX |
No |
string |
Specify the binding virtual number. If not specified, the remaining binding relationship with the most numbers will be taken from the number pool |
phoneB |
No |
string |
A dials B number through the virtual number, must be a number in the number group; If empty, A cannot dial through the virtual number |
groupId |
Yes |
string |
ID of the number group to bind |
customerBindId |
No |
string |
Custom binding ID (determined by the customer, must be unique), can be empty |
flag |
No |
int |
Other flags, bit combination, 0: none, 1: recording |
expireSecond |
Yes |
int |
Expiration time in seconds, if 0, it means no expiration |
Response Parameters
Parameter |
Type |
Description |
code |
int |
Return code, 0 means success, others mean failure |
msg |
string |
Return code description |
requestId |
string |
Request ID |
data |
Object |
Response data |
Details of the data returned by the data
parameter:
Parameter |
Type |
Description |
bindId |
string |
Binding ID of PNS, subsequent billing will be based on this |
did |
string |
Virtual number bound by PNS |
Request Example
Request URL
https://number.nxcloud.com/api/pns/
Request Headers
KEY |
VALUE |
accessKey |
sixgqophrnv4 |
ts |
1670479632933 |
bizType |
5 |
action |
bindAXG |
sign |
faxxxxxxxxxxxxxxxxxxxxxxxxxxxxd4 |
Request Body
{
"phoneA": "85211111114",
"phoneX": "85235753351",
"phoneB": "85235755551",
"groupId": "1602484f91adb0b60e",
"customerBindId": "10001",
"flag": 1,
"expireSecond": 1011
}
Response Example
{
"code": 0,
"msg": "success",
"requestId": "1602248485121429504",
"data": {
"bindId": "f6e24ebdaf64ef91adb0b60e3b582db0",
"did": "85235753351"
}
}