我对让客户参与 A2P-10DLC 活动的过程感兴趣。
我正在阅读使用 Twilio Trusthub API 创建辅助客户配置文件的文档。
我发现我可以在客户资料创建过程中提供状态回调 URL,如此处所述。
Trusthub API 文档提到,在提交客户资料供审核后,它将通知
status_callback
URL 状态更改。 here 对此进行了描述。
我的问题是:在审核客户资料后,我在哪里可以看到 Twilio 发送到
status_callback
URL 的请求正文的合同?
我一直在阅读有关客户端入门的 Twilio A2P-10DLC 文档和 TrustHub API 参考,但我似乎找不到我正在寻找的数据合同。
我也找不到...而且,我检查了各种 github 存储库。但是,如果我不得不猜测,status_callback 有效负载将与示例“提交审核”中所示的负载相同或相似:
{
"sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"policy_sid": "RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"friendly_name": "friendly_name",
"status": "pending-review",
"email": "email",
"status_callback": "http://www.example.com",
"valid_until": null,
"date_created": "2019-07-30T22:29:24Z",
"date_updated": "2019-07-31T01:09:00Z",
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"links": {
"customer_profiles_entity_assignments": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/EntityAssignments",
"customer_profiles_evaluations": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Evaluations",
"customer_profiles_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelEndpointAssignments"
}
}
友情提醒,Twilio Webhooks 采用 application/x-www-form-urlencoded 格式 - 而不是 JSON。您必须解析并创建自己的合同。例如:
您可以通过创建辅助配置文件、将 status_callback 设置为将捕获和收集任何流量(例如 requestbin)的端点来确认 Webhook 负载。
要考虑的最后一个选择是开具票证,向 Twilio 支持询问 Webhook 负载并要求他们更新公共文档。
Twilio 客户配置文件 Webhook 标头设置为 application/x-www-form-urlencoded
如果您的端点标头设置为 JSON,您可以期待以下请求正文
AccountSid:XXXXX
BundleSid:BBBBB
FailureReason:
Status:in-review