1

所以我使用了一个帐户并向我的 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 返回此网址时

发布 /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"}
}

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

4

1 回答 1

-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"
}

希望帮助:)

于 2017-08-31T14:04:16.050 回答