Skip to content

PNS API bind

henryou edited this page Dec 12, 2022 · 6 revisions

接口说明,提交A、B号码进行绑定,返回一个X号码

请求头

参数名 类型 必填 说明 示例值
accessKey string 用户的accessKey fme2na3kdi3ki
action string 请求方法 bindAXB
bizType string [业务类型] 固定值 用来标识隐私号服务 5
ts string 当前请求的时间戳(单位是毫秒),牛信服务端允许用户端请求最大时间误差为60秒 1655710885431
sign string API入参参数签名,签名算法

请求体

参数名 必填 类型 说明
phoneA string A的号码,A、B号码的国码须保持一致
phoneB string B的号码,A、B号码的国码须保持一致
customerBindId string 客户自定义的绑定id(由客户决定,需要保证唯一),可为空
flag string 其他标识,比特组合,0:none,1:录音
expireSecond string 过期秒数,若是为0,代表不过期
audioWhenCallInSuccess string 呼入成功语音,格式为wav
audioWhenCallInFailed string 呼入失败语音,格式为wav
audioWhenCallOutSuccess string 呼出成功语音,格式为wav
audioWhenCallOutFailed string 呼出失败语音,格式为wav

返回参数

参数名 类型 说明
code int 返回码,0代表成功,其他失败
msg string 返回码描述
requestId string 请求id
bindId string pns的绑定id,后续计费都会基于此
did string pns的绑定虚拟号码

请求示例

Header

KEY VALUE
accessKey sixgqophrnv4
ts 1670479632933
bizType 5
action bindAXB
sign faxxxxxxxxxxxxxxxxxxxxxxxxxxxxd4

Body

{
    "phoneA": "85211111114",
    "phoneB": "85222222222",
    "customerBindId": "1",
    "expireSecond": 1011
}

返回示例

{
    "code": 0,
    "msg": "success",
    "requestId": "1602134605326061568",
    "bindId": "f6e24ebdaf64ef91adb0b60e3b582db0",
    "did": "85235753351"
}

简介

短信

语音

云呼叫中心(NXLink)

云呼叫中心(AI自动外呼)

Flash Call

短链

邮件验证码

DID号码

通用

号码检测

WhatsApp

Viber

Zalo ZNS

Super Message API

隐私号(旧)

PNS

坐席(旧版)

AI Agent

Clone this wiki locally