简体   繁体   English

RingCentral API用户联系端点授权

[英]RingCentral API User Contact Endpont Authorization

I'm trying to create a server-only (no UI) application with the RingCentral API. 我正在尝试使用RingCentral API创建仅服务器(无UI)的应用程序。 The goal is to use their new address book endpoint to automatically create/update the user contacts for all extensions in our company. 目标是使用他们的新地址簿端点为我们公司中所有扩展自动创建/更新用户联系人。

This seems like it should be straightforward and shouldn't require user authentication (since it's a private application), but I can't see from the docs how I can authorize such an API call. 这似乎应该很简单,并且不需要用户身份验证(因为它是私有应用程序),但是我从文档中看不到如何授权这样的API调用。 The auth options seem to all require the user to provide explicit authorization. auth选项似乎都要求用户提供明确的授权。 Is there some way to do what I'm trying to do with just the client access id and secret provided by RC? 有什么方法可以仅使用RC提供的客户端访问ID和密码来完成我想做的事情吗?

The RingCentral API still requires OAuth 2.0 user authorization for server-only private applications because the authorized user is used to determine authorization scope. 对于仅用于服务器的私有应用程序,RingCentral API仍需要OAuth 2.0用户授权,因为授权用户用于确定授权范围。 For example, a user with administrative privileges can access/modify resources on a company-wide level while an individual user may only be able to access/modify resources for their own user. 例如,具有管理特权的用户可以在公司范围内访问/修改资源,而单个用户可能只能为其自己的用户访问/修改资源。

In your case, if you want to create a private app (private = for use only by your company), a simple way is to use the Resource Owner Password Credentials grant (username, extension, and password) in your code without requiring a UI (OAuth pop-up). 在您的情况下,如果要创建私有应用程序(private =仅供公司使用),一种简单的方法是在代码中使用资源所有者密码凭据授权(用户名,扩展名和密码),而无需UI (OAuth弹出窗口)。

If you want this app to have administrative access you can use the credentials for a user extension with admin privileges. 如果您希望此应用具有管理访问权限,则可以使用具有管理员权限的用户扩展凭据。 You can either use the existing admin extension or create a new one and assign admin privileges. 您可以使用现有的管理员扩展名,也可以创建一个新的管理员扩展名并分配管理员权限。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM