You need to enable JavaScript to run this app.
导航

模板审核结果回调

最近更新时间2023.03.01 17:33:13

首次发布时间2023.01.16 23:06:37

您可以在短信服务控制台的回执配置中设置回调 URL,用于接收模版的审核结果。

注意事项

回调地址需要符合以下条件,才可以成功接收短信服务模版的审核结果。

  • 使用 HTTP/HTTPS URL。

  • 短信服务可以直接访问回调地址,即回调地址具备公网访问能力。

  • 如果回调地址所在服务器设置了防火墙,请放行来自短信服务的请求。

准备工作

在您接收短信服务的回调消息之前,需要登录短信服务控制台配置用于接收回调消息的 URL。

  1. 登录短信服务控制台

  2. 在左侧导航栏,选择通用管理 > 回执配置

  3. 回执配置页面,编辑模板审核状态回调地址。

    设置您用于接收回调消息的 URL。URL 格式为http(s)://<您的回调地址>

回调请求说明

参数取值描述
Content-Typeapplication/json;charset=utf-8定义网络文件的类型和网页的编码。
Accept-Encodinggzip, deflate采用指定的压缩格式传输数据。
Accept*/*指定客户端希望接收的数据类型。

Body

请求体整体是一个 JSON 数组。

参数数据类型描述
apply_idint审核工单ID
accountstring火山主账号ID
sub_accountstring消息组ID
template_namestring模板名称
template_idstring模板ID
template_contentstring模板内容

audit_result

bool

审核结果

  • true:审核通过

  • false:未通过

audit_opinionstring审核意见,只有 audit_result 为 false 时才有
audit_timestring审核时间
vms_audit_resultlist视频短信模版审核结果

vms_audit_result

参数数据类型描述

carrier

string

运营商名称枚举
China Mobile、
China Telecom、
China Unicom

statusint模版审核状态;1: 审核中,2: 未通过,3: 已开通,4: 已关闭,5: 免审
reasonstring失败原因(部分失败会有)

回调结果示例

审核通过示例

{
    "apply_id":104679,
    "account":"2100000000",
    "sub_account":"6df86000",
    "template_name":"国内营销模版",
    "template_content":"快来参加促销活动,回T退订",
    "template_id":"ST_6e221000",
    "audit_result":true,
    "audit_time":"2022-09-14 11:55:23"
}

审核驳回示例

{
    "apply_id":170001,
    "account":"2100000000",
    "sub_account":"6df86000",
    "template_name":"templateName",
    "template_content":"4张4.5折全场咖啡券仅0.9元→ https://webhook.site/edd2b39a-6c8d-4161-a310-36a470c840d4 生椰拿铁券后低至13.05元 谨防泄漏取阅",
    "template_id":"ST_712d7000",
    "audit_result":false,
    "audit_opinion":"提醒通知短信模板请选择”通知短信“,并删除 T退订",
    "audit_time":"2022-09-14 11:54:11"
}

视频短信审核结果

{
    "account":"2100000000",
    "sub_account":"6df86000",
    "template_name":"templateName",
    "template_id":"VT_712d7000",
    "audit_time":"2022-09-14 11:54:11",
    "vms_audit_result": [
            {
                "carrier": "China Telecom",
                "status": 3,
                "reason": ""
            },
            {
                "carrier": "China Mobile",
                "status": 1,
                "reason": ""
            },
            {
                "carrier": "China Unicom",
                "status": 3,
                "reason": ""
            }
        ]
}

返回值

要求用户侧接收成功后,返回 httpStatus为200,否则火山侧会认为回调失败。
回调失败不重推。