# Drive FAQs

## 1. How to get folder, file and various types of online document token information?

### How to get folder token<br>You can obtain the folder token in the following two ways:<br>- As shown in the image below, open the folder in a browser and obtain the folder token from the address bar.<br>![image.png](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/8866710b3a6e0d9c0745e39cf368ef10_ToRoYki59M.png?height=912&lazyload=true&maxWidth=728&width=1508)<br>- Call the open platform interface to obtain:<br>- Call the [Get My Space (root folder) Metadata](https://open.feishu.cn/document/ukTMukTMukTM/ugTNzUjL4UzM14CO1MTN/get-root-folder-meta) interface to obtain the token of the root directory (i.e., the root folder).<br>- Continue to call the [List Files in a Folder](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/list) interface to obtain the token of the folder under the root directory.   <br>### How to get file token<br>You can obtain the file token in the following two ways:<br>- As shown below, open the file in the browser and obtain the file token from the address bar.<br>![image.png](//sf3-cn.feishucdn.com/obj/open-platform-opendoc/4017e82e4d522d5683ea1afc16bfaab0_3FWb61EZ5i.png?height=154&lazyload=true&maxWidth=568&width=1920)<br>- Call the open platform interface to obtain:<br>- Call the [Get My Space (root folder) Metadata](https://open.feishu.cn/document/ukTMukTMukTM/ugTNzUjL4UzM14CO1MTN/get-root-folder-meta) interface to get the root directory (i.e., root folder) token.<br>- Continue to call the [Get File List in Folder](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/list) interface to get the token of files under the root directory.    <br>### How to obtain media tokens<br>The Feishu open platform supports uploading and downloading media in Feishu documents, spreadsheets, and multi-dimensional spreadsheets. The methods for obtaining media tokens vary across different online documents. The specific methods are as follows:<br>Document Type | Method to Obtain media Token
---|---
Feishu Document | Through the [Get All Blocks in Document](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/list) API to obtain the `block_id` parameter of the specified file block or image block, which is the media token.
Spreadsheet | Through the [Read Multiple Ranges](https://open.feishu.cn/document/ukTMukTMukTM/ukTMzUjL5EzM14SOxMTN) API to obtain the `fileToken` parameter of the specified attachment, which is the media token.
Multi-Dimensional Spreadsheet | Through the [List Records](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-record/list) API to obtain the `file_token` parameter of the specified attachment, which is the media token.

## 2. How to grant access to view folders in personal drive for application identity (tenant_access_token)?

To allow the application to access folders in personal drive, follow these steps:<br>1. Visit the [Feishu Open Platform Developer Console](https://open.feishu.cn/app) and select the target application.<br>1. In the application management page, click **Add Application Capability**, find Bot Card, and click **+ Add**.<br>1. In the Feishu client, create a new group and add the application as a group bot.<br>1. In Feishu Docs, find the corresponding folder in My Space and share the folder with the newly created group.
---

## 3. How to grant download permissions for files and media to application identity (tenant_access_token)?

To share download permissions for files and media with the application, follow these steps:<br>1. Visit the [Feishu Open Platform Developer Console](https://open.feishu.cn/app) and select the target application.<br>1. In the application management page, click **Add Application Capability**, find Bot Card, and click **+ Add**.<br>1. In the Feishu client, create a new group and add the application as a group bot.<br>1. Depending on whether the shared file is in a folder, choose different permission grant methods:<br>1. If the file or media is not in a folder: **Document owner, knowledge base admin, or other collaborators** add the application as a document collaborator.<br>1. If the file or media is in a **folder:**<br>- In the Feishu client, create a new group and add the application as a group bot.<br>- In Feishu Docs, find the corresponding folder in My Space and share the folder with the newly created group.<br>1. If the application is already a document collaborator but still lacks download permissions for the files or media, check the **permission settings panel** of the cloud document or file where the media is located and confirm that the application is within the allowed permission range for **creating copies, printing, and downloading**.
---

