本文介绍了使用Webhook进行Microsoft Graph API的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Graph API为群组对话添加Web钩子。因为我需要监控所有群组的对话,所以我阅读了群组列表,并为每个群组添加了Web钩子。

I used Graph API to add web hook for group conversations. Because I need to monitor conversations for all groups, I read the group list and add web hook for every group.

20-30组后帐户),Graph API开始返回错误:

After 20-30 groups (The number will change for different accounts), Graph API begins return error:

{
  "error": {
    "code": "",
    "message": "Server could not process subscription creation payload.",
    "innerError": {
      "request-id": "af7d109a-fb6c-4b41-9aa1-988fc21309ad",
      "date": "2016-09-28T03:06:11"
    }
  }
}

似乎Graph API在收到太多订阅请求后会阻止,对吗?
那么有没有办法让我监控所有组的对话?

It seems that Graph API will block after receive too many subscription request, is this right?Then is there a way for me to monitor conversations for all group?

推荐答案

我不认为有任何除了循环遍历所有用户并且一次请求一个会话信息之外,还可以实现这一点。这里的缺点是,在旧请求完成之前请求新的信息通常是一个糟糕的主意(微软将扼杀你的连接),因此最多只能约2-3次/秒。根据您所查看的大小,用户刷新可能需要几分钟。

I don't think there's any way to accomplish this except to cycle through all the users and request conversation information one at a time. The drawback here is that it's generally a bad idea to request new information before an old request is finished (Microsoft will throttle your connection) so that limits you to about 2-3 requests/second at best. Depending on the size you're looking at, it may be several minutes between user refreshes.

这是基于我个人的经验。我找不到任何支持/拒绝这个文件的文档。

This is based on my personal experience. I can't find any documentation that supports/denies this.

这篇关于使用Webhook进行Microsoft Graph API的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-01 18:57