新用户的Graph API订阅 [英] Graph API Subscription for New Users

查看:66
本文介绍了新用户的Graph API订阅的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法确定资源和/或更改类型以创建对新创建用户的订阅.这是我所拥有的:

I'm having trouble figuring out the resource and/or change type in order to create a subscription to newly created users. Here's what I have:

    {
      "changeType": "created",
      "notificationUrl": "<someURL.com>",
      "resource": "/users",
      "expirationDateTime": "<todays date + 3>",
      "clientState": "SecretClientState"
    }

我收到以下错误:

    {
      "error": {
        "code": "InvalidRequest",
        "message": "Invalid 'changeType' attribute: 'created'.",
        "innerError": {
          "date": "2021-03-12T22:24:06",
          "request-id": "51a191c2-a13e-4c63-a5ca-17923dd783cb",
          "client-request-id": "51a191c2-a13e-4c63-a5ca-17923dd783cb"
        }
      }
    }

推荐答案

根据文档,用户资源的 changeType 的正确值应该是 updated.

According to the documentation the correct value of changeType for users resource should be updated.

注意:驱动器根项目和列表更改通知仅支持更新的更改类型.用户和组更改通知支持更新删除更改类型.

Note: Drive root item and list change notifications support only the updated changeType. User and group change notifications support updated and deleted changeType.

同样,资源的正确值应该是 users.

Also the correct value for resource should be users.

{
  "changeType": "updated",
  "notificationUrl": "<someURL.com>",
  "resource": "users",
  "expirationDateTime": "<todays date + 3>",
  "clientState": "SecretClientState"
}

订阅资源

创建订阅

针对用户的其他通知

这篇关于新用户的Graph API订阅的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆