简体   繁体   English

配置 Microsoft 团队传入 webhook json 负载

[英]Configure microsoft teams incoming webhook json payload

I am trying to set up an incoming webhook to a Microsoft teams channel using the incoming webhook connector.我正在尝试使用incoming webhook连接器将传入的 webhook 设置到 Microsoft 团队频道。 The payload that I am trying to send from my platform looks like this and is form CleverTap (which is failing so I'm trying to debug it using postman).我尝试从我的平台发送的有效负载看起来像这样,并且是 CleverTap 的形式(它失败了,所以我尝试使用邮递员对其进行调试)。 but I am getting the error Summary or Text is required.但我收到错误Summary or Text is required.

{
  "profiles": [
    {
      "email": "jack@gmail.com",
      "identity": "foo",
      "objectId": "-g55b74fb1030740e4a4931910a8abb862",
      "profileData": {
        "Last Score": 308,
        "High Score": 308,
        "Replayed": true
      },
      "name": "Jack"
    }
  ]
}
  1. What am I doing wrong?我究竟做错了什么?
  2. will I need to change the JSON payload according to the adaptive card syntax for teams to accept the incoming webhook?我是否需要根据自适应卡片语法更改 JSON 有效负载,以便团队接受传入的 webhook? If so, where can I add my custom payload in the adaptive card JSON body?如果是这样,我可以在自适应卡 JSON 主体中的何处添加我的自定义负载?
  3. are there other authentication factors at the webhook endpoint (do I have to whitelist the ip address from where the POST message is being sent from)? Webhook 端点是否还有其他身份验证因素(我是否必须将发送 POST 消息的 ip 地址列入白名单)?

To send a message using incoming webhook, you must post a JSON payload to the webhook URL. This payload should be in the form of O365 Connector card .要使用传入的 webhook 发送消息,您必须将 JSON 有效负载发布到 webhook URL。此有效负载应采用O365 Connector card的形式。 Payload of any other format is not acceptable in Teams. Teams 不接受任何其他格式的负载。 Here is an Example Connector card that you can post.这是您可以发布的示例连接器卡 You can now also send an Adaptive card using incoming webhook.您现在还可以使用传入的 webhook 发送自适应卡片。 Please check the docs here .请在此处查看文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM