我使用了 Microsoft Teams 的消息获取 API。到目前为止,它能够获取所有消息。然而,从昨天开始,我突然无法再收到到目前为止收到的消息。这是一个错误吗?
昨天和之后的消息可以通过 API 获取。如果您在 Teams 的客户端应用程序中查看相应团队的聊天记录,则过去的消息仍然来自昨天。
这是我正在使用的 API
获取 /teams/{id}/channels/{id}/messages
======================20190904 后记=====================
我拍了一张。这是 Teams 应用程序屏幕。您可以看到第一页上至少有 4 个对话。并且 8/26 消息排成一列。 在此处输入图像描述
第二个页面确认有可以通过 API 获取的对话。 在此处输入图像描述
然后使用相同的帐户来使用 Graph Explorer。描述执行消息获取API的结果。(id 被隐藏。)
仅返回 3 条消息。即使访问 nextLink,也会返回 0 个项目。
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#teams('teamid')/channels('channelid')/messages",
"@odata.count": 3,
"@odata.nextLink": "https://graph.microsoft.com/beta/teams/teamid/channels/channelid/messages?$skiptoken=token",
"value": [
{
"id": "id",
"replyToId": null,
"etag": "etagid",
"messageType": "message",
"createdDateTime": "2019-08-02T05:44:27.892Z",
"lastModifiedDateTime": "2019-08-02T06:28:57.101Z",
"deletedDateTime": null,
"subject": "重要",
"summary": null,
"importance": "high",
"locale": "en-us",
"webUrl": "https://teams.microsoft.com/l/message/channelid/id?groupId=teamid&tenantId=tenantid&createdTime=1564724667892&parentMessageId=id",
"policyViolation": null,
"from": {
"application": null,
"device": null,
"conversation": null,
"user": {
"id": "userid",
"displayName": "Hoshi, Rikito (ゲスト)",
"userIdentityType": "aadUser"
}
},
"body": {
"contentType": "html",
"content": "<div><div>\n<div>\n<div>会話がすべて消えてしまったので再投稿します。</div>\n\n<div>以下の内容を必ず読んでおいてください。</div>\n\n<div> </div>\n\n\n<div itemprop=\"copy-paste-block\">TESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTESTTEST</div>\n</div>\n</div>\n</div>"
},
"attachments": [],
"mentions": [],
"reactions": []
},
{
"id": "id",
"replyToId": null,
"etag": "etagid",
"messageType": "message",
"createdDateTime": "2019-09-03T08:16:40.73Z",
"lastModifiedDateTime": null,
"deletedDateTime": null,
"subject": "APIで取れなくなってから投稿",
"summary": null,
"importance": "normal",
"locale": "en-us",
"webUrl": "https://teams.microsoft.com/l/message/channelid/etagid?groupId=teamid&tenantId=tenantid&createdTime=1567498600730&parentMessageId=id",
"policyViolation": null,
"from": {
"application": null,
"device": null,
"conversation": null,
"user": {
"id": "userid",
"displayName": "TalkMap",
"userIdentityType": "aadUser"
}
},
"body": {
"contentType": "text",
"content": "テスト"
},
"attachments": [],
"mentions": [],
"reactions": []
},
{
"id": "id",
"replyToId": null,
"etag": "etagid",
"messageType": "message",
"createdDateTime": "2019-09-02T05:17:51.671Z",
"lastModifiedDateTime": null,
"deletedDateTime": null,
"subject": "",
"summary": null,
"importance": "normal",
"locale": "en-us",
"webUrl": "https://teams.microsoft.com/l/message/channelid/etagid?groupId=teamid&tenantId=tenantid&createdTime=1567401471671&parentMessageId=id",
"policyViolation": null,
"from": {
"application": null,
"device": null,
"conversation": null,
"user": {
"id": "userid",
"displayName": "TalkMap",
"userIdentityType": "aadUser"
}
},
"body": {
"contentType": "html",
"content": "<div>タブを追加し、会話を開始しました。</div><attachment id=\"tab::71cf5160-ec4f-4b06-b334-62f3759a7de8\"></attachment>"
},
"attachments": [
{
"id": "tab::id",
"contentType": "tabReference",
"contentUrl": null,
"content": null,
"name": "TalkMap",
"thumbnailUrl": null
}
],
"mentions": [],
"reactions": []
}
]
}