
# API错误码处理
![](https://support.huaweicloud.com/devg-PrivateNumber/public_sys-resources/note_3.0-zh-cn.png)
本章节响应码数量较多，建议您使用快捷键**Ctrl+F**在界面进行搜索，能更快地找到您需要的错误码处理建议。
#### 接口调用404问题处理
若调用接口时返回了404响应，请检查[APP接入地址](https://support.huaweicloud.com/PrivateNumber_faq/pn_faq_00023_17.html)和访问URI（详见[API参考文档](https://support.huaweicloud.com/api-PrivateNumber/privatenumber_02_0010.html)）是否都填写正确，且拼接成了完整的请求URL，如"https://rtcpns.cn-north-1.myhuaweicloud.com/rest/provision/caas/privatenumber/v1.0"。
#### 接口调用错误码处理
调用[API接口](https://support.huaweicloud.com/api-PrivateNumber/privatenumber_02_0011.html)会产生接口调用响应结果码，响应示例如下：
**注：**请根据响应码和结果码查看处理方法。
```
HTTP/1.1 200 OK 
Content-Type: application/json;charset=utf-8 
Content-Length: xx 
{ 
"resultcode":"0", 
"resultdesc":"Success", 
"origNum":"+86138****8888", 
"privateNum":"+86138****6666",
"subscriptionId":"******"
}
```
表1响应结果码 
| 响应码                                                        | 结果码     | 英文描述                                                           | 中文描述                                        | 处理方法                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|:---|:---|:---|:---|:---|
| 200                                                        | 0       | Success.                                                       | 成功。                                         | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| 400                                                        | 1023006 | Authorization not contained in the HTTP header.                | HTTP消息头未找到Authorization字段。                  | 请检查HTTP消息头中是否携带了Authorization字段。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| 400                                                        | 1023007 | realm not contained in Authorization.                          | Authorization字段中未找到realm属性。                 | 请检查Authorization字段中的是否携带了realm属性。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| 400                                                        | 1023008 | profile not contained in Authorization.                        | Authorization字段中未找到profile属性。               | 请检查Authorization字段中的是否携带了profile属性。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| 400                                                        | 1023009 | The value of realm in Authorization must be SDP.               | Authorization中realm属性值应该为"SDP"。             | 请检查Authorization字段中的realm属性值是否为"SDP"。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| 400                                                        | 1023010 | The value of profile in Authorization must be UsernameToken.   | Authorization中profile属性值应该为"UsernameToken"。 | 请检查Authorization字段中的profile属性值是否为"UsernameToken"。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| 400                                                        | 1023011 | The value of type in Authorization must be app_key.            | Authorization中type属性值应该为"Appkey"。           | 请检查Authorization字段中的type属性值是否为"Appkey"。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| 400                                                        | 1023012 | type not contained in Authorization.                           | Authorization字段中未找到type属性。                  | 请检查Authorization字段中是否携带了type属性。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| 400                                                        | 1023033 | HTTP header not found X-AKSK field                             | HTTP头未找到X-AKSK字段                            | 请检查HTTP消息头中是否携带了X-AKSK字段。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| 400                                                        | 1023034 | UserName not contained in X-AKSK.                              | X-AKSK字段中未找到UserName属性。                     | 请检查X-AKSK字段中的是否携带了Username属性。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| 400                                                        | 1023035 | Nonce not contained in X-AKSK.                                 | X-AKSK字段中未找到Nonce属性。                        | 请检查X-AKSK字段中的是否携带了Nonce属性。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| 400                                                        | 1023036 | Created not contained in X-AKSK.                               | X-AKSK字段中未找到Created属性。                      | 请检查X-AKSK字段中的是否携带了Created属性。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 400                                                        | 1023037 | PasswordDigest not contained in X-AKSK.                        | X-AKSK字段中未找到PasswordDigest属性。               | 请检查X-AKSK字段中的是否携带了PasswordDigest属性。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| 400                                                        | 1023038 | UsernameToken not contained in X-AKSK.                         | X-AKSK中没有携带UsernameToken。                   | 请检查X-AKSK字段中的是否携带了UsernameToken属性。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| 401                                                        | 1010010 | Invalid digest.                                                | PasswordDigest校验失败。                         | 请检查PasswordDigest字段填写是否正确。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| 401                                                        | 1010013 | Time out limit.                                                | 时间超出限制。                                     | 请确认X-AKSK鉴权时，生成随机数的时间与发送请求时的本地时间不能相差太大（具体差值请与管理员确认）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| 403   | 1010002 | Invalid request.                                               | 无效请求。                                       | 参考各接口参数说明，检查请求携带的参数格式是否正确，如以下参数格式问题： - 绑定接口填写的号码参数需为全局号码格式，如+86138\*\*\*\*0001或+8675528\*\*\*\*01；  - 放音文件需上传通过审核才可通过接口调用，[点击查看如何上传审核](https://support.huaweicloud.com/usermanual-PrivateNumber/pn_um_05.html)。  - 参考接口参数说明，检查是否携带了不能同时携带的参数，如AXE模式绑定接口不能同时携带callbackTone和callbackNum，若是，请保留一个；  - 参数长度或格式是否错误，如AXE模式分机号长度或timeUnit的格式是否正确。                                                    |
| 403   | 1010003 | Invalid app_key.                                               | 无效的app_key。                                 | 请检查请求携带的app_key填写是否正确。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| 403   | 1010008 | The status of the app_key is unavailable.                      | app_key状态异常。                                | 请检查请求携带的app_key所属应用状态是否正常。应用状态可登录控制台后在"应用管理"界面查看。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| 403   | 1010010 | The flow control upper limit is reached on the platform.       | 平台达到系统流控上限。                                 | 请稍等一分钟后再试。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| 403   | 1010029 | The subscriber status is frozen.                               | 用户账号已冻结。                                    | 查看账户是否欠费。 - 如欠费需充值后才能继续使用。  - 若未欠费，请联系华为云客服处理。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| 403   | 1010040 | The app_key is not allowed to invoke the API.                  | app_key没有调用本API的权限。                         | 出现该错误码表示调用的接口和app_key所属的应用模式不一致。如添加应用时选择的AXB模式的应用，调用接口时只能调用AXB模式的接口，不能调用其他模式的接口。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| 403   | 1016002 | The record already exists.                                     | 记录已经存在。                                     | 出现该错误码表示调用[AX模式绑定接口](https://support.huaweicloud.com/api-PrivateNumber/privatenumber_02_0011.html)时指定的A号码（origNum）和X号码（privateNum）之间已经存在绑定关系，请更换origNum或privateNum参数的值。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| 403   | 1011001 | Account does not exist.                                        | 账号不存在。                                      | 出现该错误码可能有以下两个原因： - 调用[AX模式相关接口](https://support.huaweicloud.com/api-PrivateNumber/privatenumber_02_0010.html)时指定的X号码（privateNum）可能不是该应用已申请的隐私号码，请确认privateNum参数的填写是否正确；  - 调用[AX模式相关接口](https://support.huaweicloud.com/api-PrivateNumber/privatenumber_02_0010.html)时填写的X号码（privateNum）格式不正确，请根据接口文档修改号码格式后再次尝试。                                                                                                                                                                                                                                                          |
| 403   | 1011002 | Insufficient number resources.                                 | 号码资源不足。                                     | 出现该错误码表示调用[AX模式绑定接口](https://support.huaweicloud.com/api-PrivateNumber/privatenumber_02_0011.html)时没有可分配的X号码，请申请新的号码资源或修改areaCode的值。[点击查看处理方法](https://support.huaweicloud.com/PrivateNumber_faq/pn_faq_00028_2.html)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| 403   | 1011003 | Exceeded the upper limit of resources that can be applied for. | 超过允许申请的资源上限。                                | 出现该错误码表示调用[AX模式绑定接口](https://support.huaweicloud.com/api-PrivateNumber/privatenumber_02_0011.html)时指定的A号码已绑定了五个X号码，请更换origNum参数的值。AX模式中一个A号码只能绑定五个X号码。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| 403   | 1011004 | The number is not applied for binding application.             | 携带的X号码和app_key没有绑定关系。                       | 出现该错误码表示调用[AX模式解绑接口](https://support.huaweicloud.com/api-PrivateNumber/privatenumber_02_0012.html)或[AX模式绑定信息修改接口](https://support.huaweicloud.com/api-PrivateNumber/privatenumber_02_0013.html)时携带的app_key和X号码没有绑定关系，请检查携带的X号码是否属于该应用。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| 403   | 1012001 | Resource of number is not to be applied.                       | 资源未申请。                                      | 出现该错误码表示调用解绑或查询绑定关系接口时携带的app_key和X号码没有绑定关系，请检查携带的X号码是否属于该应用。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 403   | 1012007 | The record does not exist.                                     | 记录不存在。                                      | - 若调用[AXB模式绑定接口](https://support.huaweicloud.com/api-PrivateNumber/privatenumber_02_0002.html)、[AXB模式解绑接口](https://support.huaweicloud.com/api-PrivateNumber/privatenumber_02_0003.html)、[AXB模式绑定信息修改接口](https://support.huaweicloud.com/api-PrivateNumber/privatenumber_02_0004.html)或[AXB模式绑定信息查询接口](https://support.huaweicloud.com/api-PrivateNumber/privatenumber_02_0005.html)时出现该错误码，表示隐私保护通话平台未查询到绑定关系，请检查携带的relationNum或subscriptionId参数是否属于该应用。  - 若调用[获取录音文件下载地址接口](https://support.huaweicloud.com/api-PrivateNumber/privatenumber_02_0007.html)时出现该错误码，表示隐私保护通话平台未查询到录音信息，请确认携带的fileName参数是否填写正确。   |
| 403   | 1012008 | Insufficient number of resources.                              | 号码资源不足。                                     | 没有可分配的X号码，请申请新的号码资源或修改areaCode的值。[点击查看处理方法](https://support.huaweicloud.com/PrivateNumber_faq/pn_faq_00028_2.html)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| 403   | 1012009 | Maximum number of resources has been exceeded.                 | 指定的X号码的绑定数量已达到上限。                           | 出现该错误码表示调用[AXB模式绑定接口](https://support.huaweicloud.com/api-PrivateNumber/privatenumber_02_0002.html)指定的X号码已经绑定了5000对关系。请修改relationNum的值，或者解除指定的X号码上的部分绑定关系。AXB模式中一个X号码只能同时绑定5000对关系。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| 403   | 1012010 | The relation number has been bound.                            | 绑定关系已存在。                                    | 出现该错误码表示调用[AXB模式绑定接口](https://support.huaweicloud.com/api-PrivateNumber/privatenumber_02_0002.html)时携带的X号码（relationNum）和A号码（callerNum）或B号码（calleeNum）已存在绑定关系，可确认后更换其他X号码进行绑定。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| 403   | 1012012 | Application does not open recording function.                  | 应用未开启录音功能。                                  | 出现该错误码表示添加应用时未开启录音功能，[点击查看如何开启录音功能](https://support.huaweicloud.com/PrivateNumber_faq/pn_faq_00023_10.html)。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 403   | 1012102 | The number status is abnormal.                                 | 号码状态异常。                                     | 出现该错误码表示调用接口时指定的X号码因投诉或号码状态异常被隐私保护通话平台加入了黑名单。 请查看订购号码时填写的邮箱是否有业务下线通知邮件，如果没有，请拨打400电话联系华为云客服处理。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| 403   | 1011005 | Resources have been allocated.                                 | 资源已经分配。                                     | 出现该错误码表示调用[AX模式绑定接口](https://support.huaweicloud.com/api-PrivateNumber/privatenumber_02_0011.html)时指定的X号码（privateNum）已和其他A号码绑定，可更换其他X号码进行绑定。 如果该X号码的绑定关系可以解除，您还可以调用[AX模式解绑接口](https://support.huaweicloud.com/api-PrivateNumber/privatenumber_02_0012.html)解除该绑定关系后，再使用该X号码进行绑定。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| 403   | 1016001 | The record does not exist.                                     | 记录不存在。                                      | - 如果调用[AX模式解绑接口](https://support.huaweicloud.com/api-PrivateNumber/privatenumber_02_0012.html)时出现该错误码，表示调用接口时指定的origNum或者subscriptionId参数不正确，未查询到绑定关系，请确认参数是否正确。  - 如果调用[AXE模式解绑接口](https://support.huaweicloud.com/api-PrivateNumber/privatenumber_02_0023.html)时出现该错误码，表示调用接口时指定的virtualNum，extendNum或subscriptionId参数不正确，未查询到绑定关系，请确认参数是否正确。                                                                                                                                                                                                                                                               |
| 403   | 1023005 | Virtual number over license limit.                             | 隐私号码超出license限制。                            | 请联系客服处理。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| 403   | 1020166 | The app client ip is not in ip white list.                     | 对端app IP不在白名单列表中。                           | 联系客服检查IP白名单是否配置正确。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| 403   | 1020167 | No idle extend Number.                                         | 没有空闲的分机号。                                   | 出现该错误码表示调用[AXE模式绑定接口](https://support.huaweicloud.com/api-PrivateNumber/privatenumber_02_0022.html)时指定的分机号（extendNum）已被占用，请重新指定分机号。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| 403   | 1013102 | The extend number has been bound.                              | 绑定关系已存在。                                    | 出现该错误码表示调用[AXE模式绑定接口](https://support.huaweicloud.com/api-PrivateNumber/privatenumber_02_0022.html)时指定的X号码（virtualNum）和A号码（bindNum）已有绑定关系，无需再次绑定。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| 500                                                        | 1010001 | Internal system error.                                         | 系统错误。                                       | 请联系客服处理。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
   
