[英]Outlook contact folders (Categories) subscription API issue
API Availability? API 有空吗? - Is there any APIs to subscribe create contact category resource ? - 是否有任何 API 可以订阅创建联系人类别资源? We are currently using the contact folder subscription for that we are facing the below issue.我们目前正在使用联系人文件夹订阅,因为我们面临以下问题。
Issue description - For the create/update contact, we do not receive any notification from Microsoft for graph and graph beta API.问题描述 - 对于创建/更新联系人,我们没有收到来自 Microsoft 的图形和图形测试版 API 的任何通知。
Details used:使用的细节:
Request body: {"notificationUrl":"","expirationDateTime":"2023-27-06T04:15:43Z","resource":"/me/contactFolders/<%contactFolderid%>/contacts","changeType":"created,updated,deleted","clientState":""}请求正文:{"notificationUrl":"","expirationDateTime":"2023-27-06T04:15:43Z","resource":"/me/contactFolders/<%contactFolderid%>/contacts","changeType": “创建、更新、删除”,“clientState”:“”}
API used - https://graph.microsoft.com/v1.0/subscriptions (Microsoft documentation ) API 使用 - https://graph.microsoft.com/v1.0/subscriptions (微软文档)
According to the doc maximum length of subscription for contacts
resource is 4230 minutes (under 3 days).根据文档, contacts
资源的最大订阅时长为 4230 分钟(不到 3 天)。
Your expirationDateTime=2023-27-06T04:15:43Z
is strange.你的expirationDateTime=2023-27-06T04:15:43Z
很奇怪。 Based on expected format yyyy-MM-ddThh:mm:ssZ
you set the month to 27.根据预期格式yyyy-MM-ddThh:mm:ssZ
,您将月份设置为 27。
Based on this probably only resources /me/contacts
or /users/{user_id}/contacts
are supported, not /me/contactFolders/<%contactFolderid%>/contacts
.基于此,可能仅支持资源/me/contacts
或/users/{user_id}/contacts
,不支持/me/contactFolders/<%contactFolderid%>/contacts
。
Try to create a subscription with expirationDateTime
that doesn't exceed 3 days尝试创建expirationDateTime
不超过 3 天的订阅
{
"notificationUrl":"<your_notification_url>",
"expirationDateTime":"2023-01-28T04:15:43Z",
"resource":"/me/contactFolders/<%contactFolderid%>/contacts",
"changeType":"created,updated,deleted",
"clientState":""
}
If possible in your case you can use delta to periodically get a set of contacts that have been added, deleted, or updated in a specified folder.在您的情况下,如果可能,您可以使用delta定期获取一组已在指定文件夹中添加、删除或更新的联系人。
GET /me/contactFolders/{id}/contacts/delta
GET /users/{id}/contactFolders/{id}/contacts/delta
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.