首页 文章

如何在RingOut上使用带有RingOut的RingCentral API上的extensionId

提问于
浏览
2

我可以RingOut成功请求:

https://platform.ringcentral.com/restapi/v1.0/account/~/extension/~/ring-out

但是当我想添加扩展名时,我得到一个 CMN-102 错误( Resource for parameter [extensionId] is not found ),请参阅下面的请求示例:

https://platform.ringcentral.com/restapi/v1.0/account/~/extension/279580017/ring-out

我'm pretty certain I have the correct id as I' m从下面的请求成功抓取 extensionId

https://platform.ringcentral.com/restapi/v1.0/account/~/extension

如果有人碰到这个或者可以指出任何潜在的陷阱,我会非常感谢一些指示 .

1 回答

  • 2

    从您的帖子和您收到的错误,我假设您正在尝试使用未授权您的应用的 extensionId 执行RingOut . 尝试这样做会导致您收到错误 . 以下是有关此内容的更多信息 .

    RingOut ExtensionId Scope

    RingOut API仅支持使用 extensionId path参数来授权用户扩展 . 因此,您需要调用的所有内容都是RingOut的以下 endpoints :

    POST /restapi/v1.0/account/~/extension/~/ring-out
    

    如果要使用显式 extensionId ,则需要在以下 endpoints 中返回extensionId:

    GET /restapi/v1.0/account/~/extension/~
    

    如果使用未授权使用访问令牌的路径 extensionId 参数调用 endpoints ,则您将收到:

    Non-Matching ExtensionId Error

    如果您尝试使用不是授权用户的路径 extensionId 值执行RingOut,您将收到以下正文的HTTP状态 404 错误:

    HTTP/1.1 404 Not Found
    
    {
      "errorCode": "CMN-102",
      "message": "Resource for parameter [extensionId] is not found",
      "errors": [
        {
          "errorCode": "CMN-102",
          "message": "Resource for parameter [extensionId] is not found",
          "parameterName": "extensionId"
        }
      ],
      "parameterName": "extensionId"
    }
    

    How to Perform RingOut for Many Users

    要在此时为许多用户执行RingOut,您需要执行以下任一操作:

    • 每个用户都必须通过OAuth 2.0授权代码或隐式授权通过登录弹出窗口对您的应用程序执行授权 .
      _999_或者,您可以询问他们的密码以执行OAuth 2.0密码授予授权 .

    我们的GitHub帐户上提供了许多OAuth 2.0演示应用程序:

    Enhancement Request

    如果您希望RingOut能够在没有活动会话的情况下向任何用户提供,请告诉我们,我们可以将其视为功能增强 . 最好的方法是使用您的RingCentral帐户登录我们的社区并在此处发布请求:

    https://devcommunity.ringcentral.com/ringcentraldev

相关问题