开发者可通过该 OpenAPI 申请小程序能力。
支持的能力列表见下方的 capacity_key 字段。
权限要求
服务商代调用场景下,需商家授予运营管理权限集。
能力申请信息 apply_info
| 能力 capacity_key | 申请信息 map key | value 类型 | 是否必填 | 描述 |
|---|---|---|---|---|
| ma.jsapi.authorizePrivateMessage | scene_desc | string | 是 | 预期使用场景 |
| img_uri_list | array | 是 | 场景示意图,使用上传素材接口获取到的路径 | |
| ma.component.instant_messaging | scene_desc | string | 是 | 预期使用场景 |
| img_uri_list | array | 是 | 场景示意图,使用上传素材接口获取到的路径 | |
| ma.openapi.privateMessageJoinGroup | complete_business_scenario_description | string | 是 | 完整的业务场景说明 |
| scene_or_user_interaction_design_screenshots | array | 是 | 场景或用户交互设计截图,使用上传素材接口获取到的路径 | |
| ma.component.joinGroup | scene_desc | string | 是 | 预期使用场景 |
| img_uri_list | array | 是 | 场景示意图,使用上传素材接口获取到的路径 | |
| ma.openapi.highPrecisionLocation | scene_desc | string | 是 | 预期使用场景 |
| img_uri_list | array | 是 | 场景示意图,使用上传素材接口获取到的路径 | |
| ma.component.clue-form | scene_desc | string | 是 | 预期使用场景 |
| 错误码 | 描述 | 排查建议 |
|---|---|---|
| -1 | 系统错误 | 建议重试 |
| 11001 | appid无法解析 | 建议重试 |
| 11009 | 参数不合法或缺少参数 | 检查参数合法性 |
| 11016 | access_token不正确或者已过期 | 检查access_token合法性 |
| 40006 | 非法请求,请求 IP 不在第三方小程序应用 IP 地址白名单内 | 添加IP地址到白名单内或者配置白名单为空 |
| 40036 | 授权小程序未授予该接口对应的权限 | 引导商家授予相关权限集 |
curl --location --request POST 'https://developer.toutiao.com/api/apps/v1/capacity/apply_capacity' \
--header 'access-token;' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"capacity_key": "ma.jsapi.authorizePrivateMessage",
"apply_reason": "xxx",
"apply_info": {
"scene_desc": "xxx",
"img_uri_list": ["xxx", "xxx"]
}
}'{
"err_no": 0,
"err_msg": "string"
}