当前位置:网站首页>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 |
边栏推荐
- 竞赛:糖尿病遗传风险检测挑战赛(科大讯飞)
- Business digitalization is running rapidly, and management digitalization urgently needs to start
- ciou损失
- Three ways to create threads
- Image batch processing | necessary skills
- Source code analysis of linkedblockingqueue
- In addition to exporting the incremental data captured by Oracle golden gate to Oracle, where can it be exported? Can be similar
- Hcip day 8
- Deployment of kubernetes
- Hyperlink label
猜你喜欢

Basic syntax of jquey

Smartbi of smart smart smart software completed the c-round financing and accelerated the domestic Bi into the intelligent era

Dry goods semantic web, Web3.0, Web3, metauniverse, these concepts are still confused? (top)

CSV文件存储

Solution: indexerror: index 13 is out of bounds for dimension 0 with size 13
![Vrrp+mstp configuration details [Huawei ENSP experiment]](/img/44/987e9ff87f5c8e2a2ab493e947f884.png)
Vrrp+mstp configuration details [Huawei ENSP experiment]

C轮融资已完成!思迈特软件领跑国内BI生态赋能,产品、服务竿头一步

【软考软件评测师】2013综合知识历年真题

Service current limiting and fusing of micro service architecture Sentinel

Two dimensional array and operation
随机推荐
Flink window & time principle
【软考软件评测师】2013综合知识历年真题
What content does the new version of network security level protection evaluation report template contain? Where can I find it?
象棋机器人夹伤7岁男孩手指,软件测试工程师的锅?我笑了。。。
After reading these 12 interview questions, the new media operation post is yours
The cooperation between starfish OS and metabell is just the beginning
Path and attribute labels of picture labels
Does gbase 8s support storing relational data and object-oriented data?
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
When unity switches to another scene, he finds that the scene is dimmed
GB/T 41479-2022信息安全技术 网络数据处理安全要求 导图概览
Three ways to create threads
思迈特软件Smartbi完成C轮融资,推动国产BI加速进入智能化时代
Shell programming specifications and variables
This flick SQL timestamp_ Can ltz be used in create DDL
After summarizing more than 800 kubectl aliases, I'm no longer afraid that I can't remember commands!
How CI framework integrates Smarty templates
There is a bug in installing CONDA environment
Day112. Shangyitong: Mobile verification code login function
SQL server time field sorting