【问题标题】:RingCentral Meetings API Error - "user needs to have [Meetings] permission for requested resource"RingCentral Meetings API 错误 - “用户需要对请求的资源拥有 [会议] 权限”
【发布时间】:2025-12-27 02:15:11
【问题描述】:

我创建了一个用于阅读会议列表的应用程序,尽管我已为 Meetings 设置了权限,但我在下方收到此错误。

API:

GET /restapi/v1.0/account/{accountId}/extension/{extensionId}/meeting

错误:

{
  "errorCode":"CMN-408",
  "message":"In order to call this API endpoint, user needs to have [Meetings] permission for requested resource.",
  "errors":[
    {
      "errorCode":"CMN-408",
      "message":"In order to call this API endpoint, user needs to have [Meetings] permission for requested resource.",
      "permissionName":"Meetings"
    }
  ],
  "permissionName":"Meetings"
}

【问题讨论】:

    标签: permissions user-permissions ringcentral


    【解决方案1】:

    用户与应用权限

    当应用通过 REST API 请求访问用户资源(如会议)时,它会使用与应用和授权应用的用户相关联的访问令牌。 API 可能需要应用程序和用户权限。当权限返回错误user needs to have如下图时,表示需要用户权限。

    In order to call this API endpoint, user needs to have [Meetings] permission \
    for requested resource.
    

    解决这个问题的三个组件:

    1. 检查用户权限
    2. 查找权限的显示名称
    3. 为用户添加权限

    1.检查用户权限

    括号内的文本是permissionId。您可以通过以下方式调用权限检查API来检查您的用户是否有此权限:

    GET /restapi/v1.0/account/~/extension/~/authz-profile/check?permissionId=Meetings
    

    您将收到如下回复。 successful 属性将根据用户是否具有特定权限显示truefalse。如果您看到此错误,应将successful 设置为false

    {
      "uri":"https://platform.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/authz-profile/check?permissionId=Meetings&targetExtensionId=11111111",
      "successful":true,
      "details":{
        "permission":{
          "uri":"https://platform.ringcentral.com/restapi/v1.0/dictionary/permission/Meetings",
          "id":"Meetings",
          "assignable":true,
          "readOnly":false,
          "siteCompatible":"Independent"
        },
        "effectiveRole":{
          "uri":"https://platform.ringcentral.com/restapi/v1.0/dictionary/user-role/3",
          "id":"3"
        },
        "scopes":[
          "Self"
        ]
      }
    }
    

    2。查找权限的显示名称

    要向用户添加此权限,需要通过在线帐户门户获取将用于添加此权限的权限的显示名称(https://service.ringcentral.com 用于生产)。

    您可以通过调用权限的字典端点来获取此信息,其中permissionIdMeetings,如下所示。

    GET /restapi/v1.0/dictionary/permission/{permissionId}
    GET /restapi/v1.0/dictionary/permission/Meetings
    

    响应将具有 displayName 属性,指示“会议应用程序访问”是在线帐户门户中的 UI 权限。

    或者,您可以进行 API 调用以获取权限列表并在此处查找 permissionId,即 Meetings。在下面的响应摘录中,"displayName":"Meetings App Access" 设置为 "id":"Meetings"

    GET /restapi/v1.0/dictionary/permission
    

    您将收到如下回复。为简洁起见,我删除了所有其他权限:

    {
      "uri":"https://platform.ringcentral.com/restapi/v1.0/dictionary/permission?page=1&perPage=100",
      "records":[
        {
          "uri":"https://platform.ringcentral.com/restapi/v1.0/dictionary/permission/Meetings",
          "id":"Meetings",
          "displayName":"Meetings App Access",
          "assignable":true,
          "readOnly":false,
          "siteCompatible":"Independent",
          "category":{
            "uri":"https://platform.ringcentral.com/restapi/v1.0/dictionary/permission-category/Meetings",
            "id":"Meetings"
          },
          "includedPermissions":[
    
          ]
        }
      ]
    }
    

    3.为用户添加权限

    现在转到 RingCentral 在线帐户门户并确保用户在其角色中拥有此权限。

    在线帐户门户位于:

    登录后,按照以下说明查找用户的角色,并确保该角色具有“会议应用访问”权限:

    它在 UI 中将如下所示:

    【讨论】: