使用botframework rest-api使用Skype机器人附加.txt,.pdf或zip文件 [英] Attach .txt, .pdf or zip file with skype bot using botframework rest-api

查看:96
本文介绍了使用botframework rest-api使用Skype机器人附加.txt,.pdf或zip文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用

I was trying to attach .txt and .pdf file to skype bot using rest-api but got this error:

{
"error": {
    "code": "BadArgument",
    "message": "Unknown attachment type"
}

}

同时我发现 Rest API附件错误,任何人都可以确认pdf还是文本文件附件是否受限制,因为其api中没有明确的声明? 我尝试使用这种格式:

Meanwhile I found Rest API attachment error, can anyone confirm if pdf or text file attachment are restricted or not as there is no clear declaration in their api? I tried with this format:

 {
    "type": "message",

   "recipient": {
        "id": "xxxxxxxJ0niMZOII93xxxxL1E"
    },
    "text": "Here's a picture of the duck I was telling you about.",
    "attachments": [
        {
          "contentType": "application/pdf",
          "contentUrl": "myfileurl",
          "name": "filename.pdf"
        }
    ]
}

谢谢.

推荐答案

由于安全问题,机器人不支持发送PDF之类的附件. Skype只能发送媒体附件,例如音频和视频.

Sending attachments such as PDFs is not supported in bots yet due to security concerns. Skype can only send media attachments such as audio and video.

您可以在此处

这篇关于使用botframework rest-api使用Skype机器人附加.txt,.pdf或zip文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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