当前位置:网站首页>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 |
边栏推荐
- Js继承方法
- PHP Basics - PHP uses mysqli
- Explain cache consistency and memory barrier
- Day112. Shangyitong: Mobile verification code login function
- Hcip --- LDP and MPLS Technology (detailed explanation)
- Flink Window&Time 原理
- Deployment of kubernetes
- Smartbi of smart smart smart software completed the c-round financing and accelerated the domestic Bi into the intelligent era
- Service current limiting and fusing of micro service architecture Sentinel
- Will sqlserver CDC 2.2 generate table locks when extracting large tables from the source
猜你喜欢
![Chapter 2-2 calculation of piecewise function [1]](/img/40/cad6bf92849624199af0fd1ba1d433.jpg)
Chapter 2-2 calculation of piecewise function [1]

Argocd Web UI loading is slow? A trick to teach you to solve

Flink window & time principle

Quickly build a gateway service, dynamic routing and authentication process, and watch the second meeting (including the flow chart)

竞赛:糖尿病遗传风险检测挑战赛(科大讯飞)

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

HCIP第八天

Competition: diabetes genetic risk detection challenge (iFLYTEK)

After reading these 12 interview questions, the new media operation post is yours

Different HR labels
随机推荐
解决:IndexError: index 13 is out of bounds for dimension 0 with size 13
Why can ThreadLocal achieve thread isolation?
Deployment of kubernetes
为什么 ThreadLocal 可以做到线程隔离?
Flink Window&Time 原理
Day112. Shangyitong: Mobile verification code login function
When will brain like intelligence, which is popular in academia, land? Let's listen to what the industry masters say - qubits, colliders, x-knowledge Technology
postgresql查询【表字段类型】和库中【所有序列】
Redis 基本知识,快来回顾一下
SQL server time field sorting
分布式系统架构理论与组件
Vrrp+mstp configuration details [Huawei ENSP experiment]
Introduction to self drive tour of snow mountains in the West in January 2018
象棋机器人夹伤7岁男孩手指,软件测试工程师的锅?我笑了。。。
View the dimensions of the list
'global event bus' &' message subscription and Publishing '
I use SqlClient normally, and dlink submission will report this error. What should I do?
Blog Building 9: add search function to Hugo
Explain cache consistency and memory barrier
HCIP第八天