隐私保护通话 PRIVATENUMBER-短信通知接口:接口示例

时间:2024-11-19 14:24:01

接口示例

接口示例仅供参考,请以实际消息为准。
  • notify模式
    请求示例
    POST /notify HTTP/1.1 
    
    content-type: application/json;charset=UTF-8
    authorization: WSSE realm="SDP",profile="UsernameToken",type="Appkey"
    x-wsse: UsernameToken
    Content-Type: application/json;charset=UTF-8 
      
    {
    "appKey":"****",
    "smsEvent":{"smsIdentifier":"********",
                "notificationMode":"Notify",
                "calling":"+86138****0001",
                "virtualNumber":"+86138****0000",
                "event":"Text SMS ",
                "timeStamp":"2020-12-23T09:06:16.450Z",
                "extInfo":{"extParas":[{"key":"splitNum","value":"0"},{"key":"direction","value":"2"}]},
                "sendResult":2
                }
    }
    响应示例
    HTTP/1.1 200 OK 

  • Block模式

    请求示例

    POST /block HTTP/1.1 
    
    content-type: application/json;charset=UTF-8
    authorization: WSSE realm="SDP",profile="UsernameToken",type="Appkey"
    x-wsse: UsernameToken
    Content-Type: application/json;charset=UTF-8 
      
    {
    "appKey":"****",
    "smsEvent":{"smsIdentifier":"****",
                "notificationMode":"Block",
                "calling":"+86138****0001",
                "virtualNumber":"+86138****0000",
                "event":"TextSMS",
                "timeStamp":"2018-09-13T09:46:16.023Z",
                "extInfo":{"extParas":[{"key":"splitNum","value":"2"},{"key": "direction","value": "1"}]},
                "sendResult":0
                 }
    }
    响应示例
    HTTP/1.1 200 OK 
    
     Content-Type: application/JSON;charset=UTF-8 
     Content-Length: xx 
      
    { 
    "actions":[{ 
                "operation":"vNumberRoute", 
                "message":{"called":"+86138****0002", 
                           "calling":"+86138****0001"
                          } 
               }] 
     }
support.huaweicloud.com/api-PrivateNumber/privatenumber_02_0008_3.html