【问题标题】:Skype Bot Rest API Conversation IDSkype Bot Rest API 对话 ID
【发布时间】:2017-01-13 18:07:02
【问题描述】:

所以我使用了一个帐户并向我的 Skype 机器人发送消息。

我在我的端点 url 上得到这个 json 响应。我发了一条短信“添加”

{"text":"add"
,"type":"message"
,"timestamp":"2017-01-13T15:38:32.242Z"
,"id":"1234567"
,"channelId":"skype"
,"serviceUrl":"https:\/\/smba.trafficmanager.net\/apis\/"
,"from":{"id":"29:yyyy","name":"Real Person"}
,"conversation":{"id":"29:yyyy"}
,"recipient":{"id":"28:xxxx","name":"Skype Test"}
}

当我使用 yyyy 作为 conversationId 返回此网址时

POST /v3/directline/conversations/{conversationId}/activities https://directline.botframework.com/v3/directline/conversations/yyyy/activities

使用这个参数:

{
  "type": "message",
 "text": "registration",
  "from": {
    "id":"xxxx","name":"Skype Test"
  },
  "recipient": {"id":"yyyy","name":"Real Person"}
}

我收到一个未知的对话回复。不知道出了什么问题。

【问题讨论】:

标签: botframework skype skypedeveloper direct-line-botframework


【解决方案1】:

您的回复应如下所示:

{
    "type": "message",
    "from": {
        "id": "recipient_id",
        "name": "recipient_name"
    },
    "conversation": {
        "id": "conversation_id",
        "name": "conversation_name(if available)"
   },
   "recipient": {
        "id": "from_id",
        "name": "from_name"
    },
    "text": "response_text",
    "replyToId": "activity_id"
}

希望帮助:)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多