# API Explorer Guide
# Overview

API Explorer is a tool that can assist you in debugging, testing and using Feishu Open APIs.

Through API Explorer, you can easily complete the interface call without writing codes. In addition, we provide the following functions to improve your interface debugging efficiency:
- **Automatically obtain authentication credentials**: Bind your application to obtain the token with one click, no additional request needed
- **Built-in scope application**: The scopes required for API are clearly stated, apply easily within the tool
- **Sample code to help development**: We provide multi-language sample codes, copy and quickly reuse it into your codes

![](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/95fdafb7c96dd05f28c25cc1e164d506_8kAj3hbZ5w.gif?height=510&lazyload=true&width=1100)
**Notice**：The API Explorer is not supported in a privatized environment.

# Try it here

You can enter API Explorer through the developer document by clicking "Try it" next to the description. Also, you can access it through [here](https://open.feishu.cn/api-explorer?from=guide).
![](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/b9d52317aeb056ef90f1033dc639c6f8_HoV8flHkW8.png?height=1358&lazyload=true&width=2826)

# Components

## Choose your app

The first time you use API Explorer, you need to log in first. After logging in, you need to bind an identity to your application before debugging. (You need to create an app first before exploring any API)
![](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/4fb776a97bcf4473ea16de4d9e7beb87_dFHDXpMVq4.png?height=824&lazyload=true&width=1866)

You can switch to your other apps at any time after binding, no need to worry.
With the Test Companies functionality, the app created by the developer can be divided into **official version** and **test version**. The API Explorer supports debugging of both applications.
![](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/015b01f4f88f5528d02a0f20b9cae36b_fn2UKSORp9.png?height=968&lazyload=true&width=1534)
Note: Debugging the official version will directly affect the online data. We recommend developers to [bind the test application in the Developer Console](https://open.feishu.cn/document/home/introduction-to-custom-app-development/testing-enterprise-and-personnel-functions), and use the test version for debugging during the development phase.

## Obtain access token automatically

To call the server-side API, the app needs to obtain the corresponding access token from the Feishu Open Platform for authorization.

- **tenant_access_token:** Call the API on behalf of the app. The range of readable and writable data is determined by the app's own [data permission range](https://open.feishu.cn/document/home/introduction-to-scope-and-authorization/configure-app-data-permissions). For more information, see [Get access tokens](https://open.feishu.cn/document/ukTMukTMukTM/uMTNz4yM1MjLzUzM).
- **user_access_token:** Call the API on behalf of the user. The range of readable and writable data is determined by the user's data permission range. For more information, see [Get access tokens](https://open.feishu.cn/document/ukTMukTMukTM/uMTNz4yM1MjLzUzM).

When your app calls an API, it needs to contain an access token in the request `Header` and use the syntax `Authorization:Bearer <access token>`. Different APIs can support one or more types of access tokens.

Using API Explorer, you can obtain the authentication credentials required by the interface automatically without additionally calling the "Get Tenant/User Access Credentials" interface. The obtained token will then be automatically filled in the interface request parameters.
![](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/1c8c07fc174f9a389299acc750fdfb3e_1J59NYbNYk.png?height=684&lazyload=true&width=2864)
**Note**: The access token has a validity period. You can check the validity period through the returned expiration time parameter when obtaining the access token. When the token expires, it needs to be refreshed.

## Run

### Fill in query parameters

You can fill in the request header, request body, and query parameters, modify the default values of each input parameter to initiate a call, and explore the API response under different input parameters.
![](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/4ed813a9fd452cbb8a20821cbf7ea988_ldKioRevL0.png?height=892&lazyload=true&width=2850)

### Add scopes

Scopes are bound to **API** capabilities, data **fields**, and subscription **events**. If the scopes required by the interface you are calling are missing, there will be a small red dot error message on API Explorer, and you need to initiate an application in time. [App scopes](https://open.feishu.cn/document/ukTMukTMukTM/uQjN3QjL0YzN04CN2cDN)
The app administrator of this tenant can customize which scopes in the tenant need to be reviewed and which scopes can take effect directly without review. The scopes include:
- **Automatically approved scope**: indicates scopes that take effect immediately upon request. This type of scopes does not require administrator review.
- **Manually approved scope**: After requesting, you need to create an app version and submit it for review, and it will take effect only after the administrator reviews and approves it.
![](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/218a74531f7bc2ff68bf3d7fd996a9c5_B4BduzbnOu.png?height=824&lazyload=true&width=2846)

### Start testing

Click "RUN" and then view results.
![](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/444949a6228b1ac412bbea53cbc4ba1f_4e8M1m2irl.png?height=1046&lazyload=true&width=2720)
If failed, try read the API reference to locate and fix the issues on your own, or copy log ID and then contact technical support to get help.
![](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/8b9a7ef2988a15efd2ed70e9f78deed2_Hh7xNMlQkD.png?height=854&lazyload=true&width=2062)

## View call records

For each app, API Explorer records and displays your call history for the last 30 days. If you need to call a batch of related interfaces, you can check the call history, reuse the call parameters of the history, or use the previous call parameters to restart debugging.
![](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/508e4a84ae3162c65ddd709de7afd8ff_dUXB4oYc3d.png?height=1870&lazyload=true&width=3356)

## Reuse sample codes

After editing the request parameters, the API Explorer will generate real-time multi-language call examples based on the request parameters you entered. Developers can directly copy the sample code with one click and reuse it in your own business code.
![](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/79517df457f516a0959ab990a246010d_L99bgrRLzs.png?height=694&lazyload=true&width=2200)

# Feedback

If you have any product suggestions and feedback on the API interface or the tool itself during the debugging process, please feel free to post topics in our [developer community](https://applink.feishu.cn/client/chat/chatter/add_by_link?link_token=759h4ba1-2893-439f-9be9-502724582e76).
![](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/3f3b7d4e0f89422b39232eee6e107bf0_olESR0NAMb.png?height=380&lazyload=true&width=1440)

You can also give us feedback on your experience at any time through the feedback interface of the API Explorer.
![](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/57213a10f7f3138f1cf102052d803d03_IqcbtH7cYh.png?height=1084&lazyload=true&width=1736)