我已经使用机器人框架编写器部署了一个机器人并将其部署在 MS 团队中。现在我想合并个性化消息来问候用户,我正在尝试关注这篇文章https://docs.microsoft.com/en-us/microsoftteams/platform/bots/how-to/get-teams-context ?tabs=json#get-single-member-details
下面是我得到的 401 异常。
{
"type": "message",
"serviceUrl": "http://localhost:49558",
"channelId": "emulator",
"from": {
"id": "<>id",
"name": "Bot",
"role": "bot"
},
"conversation": {
"id": "<id>"
},
"recipient": {
"id": "<id>",
"role": "user"
},
"locale": "en-US",
"text": "{\r\n \"statusCode\": 401,\r\n \"reasonPhrase\": \"Unauthorized\",\r\n \"headers\": {\r\n
\"Server\": \"Microsoft-HTTPAPI/2.0\",\r\n \"Date\": \"Fri, 05 Mar 2021 10:29:31 GMT\"\r\n },\r\n
\"content\": {\r\n \"message\": \"Authorization has been denied for this request.\"\r\n }\r\n}",
"speak": "{\r\n \"statusCode\": 401,\r\n \"reasonPhrase\": \"Unauthorized\",\r\n \"headers\":
{\r\n \"Server\": \"Microsoft-HTTPAPI/2.0\",\r\n \"Date\": \"Fri, 05 Mar 2021 10:29:31
GMT\"\r\n },\r\n \"content\": {\r\n \"message\": \"Authorization has been denied for this
request.\"\r\n }\r\n}",
"attachments": [],
"entities": [],
"replyToId": "<id>",
"id": "<id>",
"localTimestamp": "2021-03-05T15:59:32+05:30",
"timestamp": "2021-03-05T10:29:32.254Z"
}
任何建议都会很有帮助。