跳到主要内容

返回码


为了方便用户理解 Marketing API 调用返回的错误信息,平台将通过errors结构对关键信息进行暴露,确保所有接入客户均可通过程序化的方式,对报错进行处理。

返回示例

以请求被黑白名单拒绝而返回无权限的报错信息为例:

{
"code": 31033,
"message": "This parameter is not permitted on this behavior_or_interest, the sign is intent_targeting. trace_id: a7afca14bb571095be3914645d3ec905",
"message_cn": "您没有权限操作指定参数,参数名:behavior_or_interest,对应的白名单标识:intent_targeting,请联系您的运营经理申请此白名单权限。trace_id: a7afca14bb571095be3914645d3ec905",
"errors": [
{
"type": "PRIVILEGE_PARAM_EXCEPTION", // 代表该客户因为账户不在灰度白名单范围内而无法使用指定功能
"description": "This parameter is not permitted on this behavior_or_interest, the sign is intent_targeting.",
"privilege_param_exception_spec": {
"param": "behavior_or_interest",
"privilege_code": "intent_targeting" //通过privilege_code暴露白名单名称,方便接入客户进行程序化处理。
}
}
]
}

其中,errors 是一个数组,仅在某些有必要返回关键信息的情况下存在。 该数组具有以下关键属性:

  • type:一定会返回,表示报错类型,不同的报错类型,具有不同的 spec 结构,如例子中的privilege_param_exception_spec,是针对 PRIVILEGE_PARAM_EXCEPTION 类型的定制 spec 。
  • spec:指定情况下会返回,关键报错信息,如 privilege_code 是白名单标识;和 type 是联动关系,spec 的名字为 type 的小写+"_spec"组成,同一种 type 下,返回的 spec 结构是一致的,如例子中的PRIVILEGE_PARAM_EXCEPTION 类型,返回的 spec 关键信息均为 param 和 privilege_code。
  • description:指定情况下会返回,报错信息描述。


返回码列表

返回码提示信息描述
10000We are unable to process your request at this time. Please retry your request. If you encounter this error repeatedly, please contact our dedicated supporting team.系统繁忙,请稍后重试
10001Marketing API is undergoing temporary maintenance.Marketing API 正在进行临时维护,请稍后再访问
11000Access token is expired.您的 access_token 已过期,请通过 oauth/token 接口获取最新 token
11001Your IP is not in the whitelist for this API.您的 IP 不在此 API 允许访问的 IP 白名单中
11002Access token is invalid.您的 access_token 无效,请通过 oauth/authorize 接口获取 token
11004Access token is malformed.您的 access_token 格式不正确,请通过 oauth/authorize 接口获取 token
11005Access token is empty.access_token 为必填字段,请传入正确的 access_token
11006The redirect URI in the request does not match the ones authorized for the client.Please update the authorized redirect URIs.请求中的重定向 URI 与为客户端授权的重定向 URI 不匹配,请更新授权的重定向 URI
11007The client_id is invalid.应用 id 无效,请检查 access_token 正确性
11008Application request limit has been exceeded.该应用的请求次数已达限制,请稍后重试
11009Authorization code is expired.授权码过期,请重新发起授权流程
11010Refresh token is malformed.refresh_token 格式错误,请检查 refresh_token 正确性
11011Authorization code is malformed.授权码格式错误,请检查 authorization_code 正确性
11012Refresh token is expired.refresh_token 过期,请重新发起授权流程
11013Authorization code can only be used once.授权码只能使用一次,请重新发起授权流程
11014The API you requested is out of the scope of authority.您请求的接口超出了授权范围,请在开发者开通对应权限后,重新发起授权
11016Application has reached the request limit per second.应用程序已达到每秒的请求限制,请稍后再试
11017Application has reached the request limit per minute.应用请求已达分钟频次上限,请 1 分钟后重试,或在官网提交工单申请开通更多频次配额
11018Application has reached the request limit per day.应用请求已达天频次上限,请 1 天后重试,或在官网提交工单申请开通更多频次配额
11019Your request is much too frequent.您的请求太频繁了,请稍后重试
11020Access token of the stress-test is invalid.压测的访问令牌无效
11021You have been temporarily blocked. If you have any questions, please contact our dedicated supporting team.您的 IP 暂时被封锁,如有疑问,可以联系我们技术支持团队
12000Your request is missing a required parameter.您的请求缺少必须参数:access_token,timestamp,nonce
12001Parameter 'grant_type' must be one of the following values: [authorization_code or refresh_token].参数 grant_type 的值必须是下列之一:[authorization_code or refresh_token]
12002Parameter 'authorization_code' cannot be an empty string.参数 authorization_code 不能为空字符串,请调整参数后重试
12003JSON string is malformed.JSON 字符串格式错误,请调整参数后重试
12004The parameter 'nonce' has too many characters.参数 nonce 的字符太多
12006A system frequency limit has been exceeded.超过系统频率限制,请稍后再试
12007The API you requested is unknown. Please check your URL and http method.您请求未知的接口,请检查您的 URL 和 HTTP 方法
12008Parameter 'fields' must be array.参数 fields 必须为数组,请调整参数后重试
12009Tried accessing nonexisting field in the parameter 'fields' you provided.参数 fields 中有不存在的字段,请调整参数后重试
12010The api you requested does not support idempotence.您请求的接口不支持幂等
12011The number of sub requests has reached the limit.批量请求的子请求个数超过限制
12100The nonce has been used before.nonce 已被使用,请更换 nonce
12101The timestamp is expired.时间戳过期,请确认发起请求时的 timestamp 字段赋值逻辑
12200Parameter 'account_id' is invalid.account_id 参数无效,请校验当前 token 是否具有操作当前 account_id 的权限
12201Parameter 'account_id' is invalid.account_id 参数无效,请校验当前 token 是否具有操作当前 account_id 的权限
12202The resource owner is not permitted to perform this operation.资源所有者未允许执行此操作,请确认操作者角色与资源关系的正确性
12203The resource owner is not permitted to operate this 'account_id'.资源所有者未允许操作此帐号 id,请确认当前 token 是否具有操作此 account_id 的权限
12300There is something wrong in encrypt decode加密解码失败,请检查传入参数正确性
12400Please activate your advertiser account for your mp account first.请先为您的 mp 帐户激活相应的广告帐户
12401The agency account you specified is not supported by MP Open API v1.0.MP Open API v1.0 不支持您指定的代理商帐户
12402The interface is not supported by MP Open API v1.1.MP Open API v1.1 不支持该接口
12500Parameter 'uid' is invalid.参数 uid 无效
12600The client does not exist.客户端不存在
12700The resource you specified is being modified. Please try again later.其他请求正在同时更新你请求的资源,为了保证数据一致性,请稍后重试
12701The account has been banned from creating new ads. If you have any questions, please contact online customer service or email "ads_ss"(Tencent Advertising Appeal Center)账户已被禁止新建广告,如有疑问请联系在线客服或邮件 ads_ss(腾讯广告申诉中心)
30000We are unable to process your request at this time. Please retry your request. If you encounter this error repeatedly, please contact our dedicated operation team.系统繁忙,请稍后重试
18001Your request is missing a required parameter. The required parameter is '{PARAM}'.您的请求缺失必要的参数: '{PARAM}'。
18002Parameter '{PARAM}' must be {PARAM}.参数'{PARAM}'必须设置为 {PARAM}。
18003The value you specified for '{PARAM}' is invalid. Valid values must be less than {PARAM}.您设置的参数'{PARAM}'数值错误,可用数值应小于等于{PARAM}。
18004The value you specified for '{PARAM}' is invalid. Valid values must be greater than {PARAM}.您设置的参数'{PARAM}'数值错误,可用数值应大于等于{PARAM}。
18005The value is invalid for the associated parameter '{PARAM}'.您设置的参数'{PARAM}' 数值非法
18006The value of parameter '{PARAM}' contains disallowed characters.参数'{PARAM}'包含不允许使用的字符
18007The parameter '{PARAM}' has too many characters, the length of the value cannot be more than the max length {PARAM}.参数'{PARAM}'包含过多字符,数值长度不应大于最大值 {PARAM}
18008The parameter '{PARAM}' has too few characters, the length of the value cannot be less than the min length {PARAM}.参数'{PARAM}'包含过少字符,数值长度不应小于最小值 {PARAM}
18012Your request contains too few values for '{PARAM}'. This parameter must have a minimum of {PARAM} value(s).您请求的参数'{PARAM}'包含的数据条数过少,该参数允许的最少条数是:'{PARAM}'。



该内容是否有帮助?