当前位置:网站首页>Larkapi access credentials overview
Larkapi access credentials overview
2022-07-28 08:57:00 【Young Yong】
API Overview of access credentials
Last updated on 2022-05-16
To call the server API, Applications need to start from Lark Open the platform to obtain the corresponding access credentials (access token); Access credentials represent the application from the platform 、 Tenant ( Refers to the company or team )、 Authorization obtained by the user .
To obtain with authorization Lark Open platform access credentials (access token), You need first. Complete the following steps :
The application is registered on the open platform Declare the required permissions in the developer background , And release an application version Users of the application ( User or tenant administrator ) Authorize the application
Access credentials access token
The open platform provides 3 There are different types of access credentials , Used to verify the identity of the caller 、 Ensure that the caller has the necessary permissions to perform the operation : app_access_token:
application
Authorization certificate , Based on this, the open platform can identify the application identity of the caller , Applications can access information related to the application itself , It does not belong to specific enterprises or users , For example, obtain the user identity of the currently logged in application .
tenant_access_token:
Tenant
Authorization certificate , Use this access token, The application will perform corresponding operations on behalf of the company or team , For example, get the information of an address book user .
user_access_token:
user
Authorization certificate , Use this access token, The application will perform corresponding operations on behalf of the user , Such as through API Create a cloud document or an agenda .
The following are three examples of access credentials and how to obtain them :
| Access credentials | Example | Access method |
|---|---|---|
| app_access_token( App store app ) | a-7f1bcd13fc57d46bac21793a18e560e04dcce45f | Get app access credentials |
| app_access_token( Enterprise self built application ) | t-7f1bcd13fc57d46bac21793a18e560e04dcce45f | Get app access credentials |
| tenant_access_token( App store app ) | t-7f1bcd13fc57d46bac21793a18e560e04dcce45f | Obtain tenant access credentials |
| tenant_access_token( Enterprise self built application ) | t-7f1bcd13fc57d46bac21793a18e560e04dcce45f | Obtain tenant access credentials |
| user_access_token | u-7f1bcd13fc57d46bac21793a18e560e04dcce45f | Get user access credentials |
How to use access credentials (access token)
Different API One or more of the above access credentials may be supported (access token) As API Authentication means when calling . API Invocation time , Need to put access token Put in the request Header in , Use the syntax Authorization:Bearer <access token> To call . Here is a call API Inquire about Get the list of users An example of , It should be noted that , In the example access_token need Replace For valid access credentials (access token).
$curl --request GET 'https://open.feishu.cn/open-apis/contact/v3/users' \
--header 'Content-Type: application/json; charset=utf-8' \
--header 'Authorization:Bearer < Actually access token>'
Corresponding HTTP Request content :
GET /open-apis/contact/v3/users HTTP/1.1
Host: open.feishu.cn
Content-Type: application/json;charset=utf-8
Authorization: Bearer < Actually access token>
Select the appropriate access credentials (access token)
Different access token Represents different resource access rights , Different API May support one or more of the above access token access . Call the same API, Use different access token Different data will be obtained .
user_access_token: Users need to log in or authorize applications , Applications can perform related operations as users , Data range accessed 、 The operations that can be performed will be affected by the permissions of the user tenant_access_token perhaps app_access_token: Authorized by the administrator , The application uses its own identity for related operations , Data range accessed 、 The operations that can be performed will be affected by the data permissions of the application itself
You need to choose the right one according to the application scenario access token, Here are the differences access token stay Under the main scenario The difference between .
| Access credential type | Whether user authorization is required | Whether the tenant administrator authorization is required | Applicable application scenarios |
|---|---|---|---|
| app_access_token | Unwanted | Unwanted | Pure background services, etc |
| tenant_access_token | Unwanted | need | Web applications 、 robot 、 Pure background services, etc |
| user_access_token | need | Unwanted | Applet 、 Web application, etc |
边栏推荐
- How to execute the SQL assembled in ODPs SQL function and get the return value?
- There is a bug in installing CONDA environment
- Completion report of communication software development and Application
- Alibaba internal interview materials
- Source code analysis of linkedblockingqueue
- Basic syntax of jquey
- SQL server time field sorting
- VS2015使用dumpbin 查看库的导出函数符号
- Detailed explanation of DHCP distribution address of routing / layer 3 switch [Huawei ENSP]
- Chapter 2-2 calculation of piecewise function [1]
猜你喜欢

Why setting application.targetframerate doesn't work

Uniapp ---- detailed steps to obtain the longitude and latitude of the current position and other information (including applet)

Recruiting talents, gbase high-end talent recruitment in progress

Shell编程规范与变量

Solution: indexerror: index 13 is out of bounds for dimension 0 with size 13

置顶各大平台,22版面试核心知识解析笔记,强势上榜

1w5字详细介绍分布式系统的那些技术方案

微服务架构 Sentinel 的服务限流及熔断

Baidu AI Cloud Jiuzhou district and county brain, depicting a new blueprint for urban and rural areas!

Kubernetes technology and Architecture (VII)
随机推荐
Does gbase 8s support storing relational data and object-oriented data?
Two dimensional array and operation
Customer first | domestic Bi leader, smart software completes round C financing
Shell programming specifications and variables
Business digitalization is running rapidly, and management digitalization urgently needs to start
You're not still using xshell, are you? This open source terminal tool is yyds!
Competition: diabetes genetic risk detection challenge (iFLYTEK)
Introduction to self drive tour of snow mountains in the West in January 2018
Alibaba internal interview materials
Introduction of functions in C language (blood Book 20000 words!!!)
When I use MySQL CDC, there are 100 million pieces of data in the source table. In the full volume phase, when I synchronize 10 million, I stop, and then pass
Hyperlink label
After reading these 12 interview questions, the new media operation post is yours
How does QT delete all controls in a layout?
PHP基础知识 - PHP 使用 PDO
ciou损失
Machine learning how to achieve epidemic visualization -- epidemic data analysis and prediction practice
Why can ThreadLocal achieve thread isolation?
模型预测控制(MPC)解析(九):二次规划的数值解(下)
CAT1 4g+ Ethernet development board 232 data is sent to the server through 4G module TCP