团队中的自适应卡不起作用-REST API [英] Adaptive card in teams not workig - REST API

查看:93
本文介绍了团队中的自适应卡不起作用-REST API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过机器人框架为团队创建了一个机器人(nodejs服务器).

I created a bot (nodejs server) for teams - through bot framework.

我正在尝试发送通过以下方式创建的自适应卡:自适应卡设计器

I'm trying to send adaptive card that I created through: adaptive cards designer

我收到错误消息:

{"code":"BadArgument","message":"ContentType of an attachment is not set"}

请求正文:

{
  "type": "message",
  "from": {
    "id": "xxxxxx"
  },
  "conversation": {
    "id": "xxxxxx"
  },
  "recipient": {
    "id": "xxxxx"
  },
  "replyToId": "xxxxx",
  "text": "some text",
  "attachments": [
    {
      "type": "AdaptiveCard",
      "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
      "version": "1.2",
      "body": [
        {
          "type": "TextBlock",
          "text": "some text"
        },
        {
          "type": "Input.Date",
          "separator": true
        }
      ]
    }
  ]
}

希望获得帮助

推荐答案

添加附件时,您需要设置附件对象的contentTypecontent属性.

When adding attachments you'll want to set the contentType and content properties of the attachment object.

这篇关于团队中的自适应卡不起作用-REST API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆