# Obtain rich text content of a documentwarning
This API does not support the Upgraded Docs whose type is `docx`. If you need to obtain the rich text content of the Upgraded Docs, call the following APIs:
- [Query All Blocks](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/list)
- [Query Block](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/get)
- [Query Block Children](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-children/get)
This API is used to obtain structured document content.

## Prerequisites

Before using this API, carefully read [Overview](https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/docs-doc-overview) and [Prepare to integrate the Docs API](https://open.feishu.cn/document/ukTMukTMukTM/ugzNzUjL4czM14CO3MTN/guide/getting-start) to understand the calling rules and limitations of the Docs API. This will ensure your Docs data is not lost or corrupted.  
For a definition of the document data structure, see: [Document Data Structure Overview](https://open.feishu.cn/document/ukTMukTMukTM/uAzM5YjLwMTO24CMzkjN). 

## Request

Facts | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/doc/v2/:docToken/content
HTTP Method | GET
Required scopes<br>**The scopes required to call this API. You can call the API with any of the scopes.**<br>Enable any scope from the list | View, comment, edit, and manage all files in My Space(drive:drive)<br>View, comment, and download all files in My Space(drive:drive:readonly)<br>View, comment, edit, and manage Docs(docs:doc)<br>View, comment, and export Docs(docs:doc:readonly)<br>View document content(docs:document.content:read)

### Request header

Parameter | Type | Required | Description
---|---|---|---
Authorization | string | Yes | `user_access_token` or `tenant_access_token`<br>**Value format**: "Bearer `access_token`"<br>**Example value**: "Bearer u-7f1bcd13fc57d46bac21793a18e560"<br>[Learn more about how to access and use access_token](https://open.feishu.cn/document/ukTMukTMukTM/uMTNz4yM1MjLzUzM)
Content-Type | string | Yes | **Fixed value**: "application/json; charset=utf-8"

For more information about how to call the AccessToken in the Docs API, see [Get started with the Docs API](https://open.feishu.cn/document/ukTMukTMukTM/uczNzUjL3czM14yN3MTN).
<br>
### Path parameters

| Parameter | Type | Required | Description | 
| ------------- | ------ | ---- | --------- | 
| docToken      | string | Yes   | For more information about how to obtain the token, see [How to get the token of docs resources](https://open.feishu.cn/document/ukTMukTMukTM/uczNzUjL3czM14yN3MTN#036e0b0f). | 

### Curl request demo
```
curl -H 'Authorization: Bearer u-CMtIuEpUAu7NdYOI4fLNjg' 'https://open.feishu.cn/open-apis/doc/v2/doccng20xjcYZ2C4FNEoHFGQZng/content'
```

## Response
### Response body
| Parameter | Description |
| -------- | --------------------------------- |
| content  | For details, see [Document Data Structure](https://open.feishu.cn/document/ukTMukTMukTM/ukDM2YjL5AjN24SOwYjN) |
| revision | Current document version                    |
### Response body example

```json
{
    "code": 0,
    "msg": "Success",
    "data": {
        "content": "{}",
        "revision": 1000  
    }
}
```

### Error code

Error code | Description | Troubleshooting suggestions
---|---|---
91401 | PARAMERR | Check parameter validity
91402 | NOTEXIST | Check if the token is valid
91403 | FORBIDDEN | Check for document read permissions
91404 | LOGIN_REQUIRED | Need to log in
95001 | internal error | Internal error, please try again later.
95003 | internal error | Internal error, please try again later.
95005 | internal error | Internal error, please try again later.
95006 | Failed | Check if the token is valid
95007 | Failed | Deleted file cannot get document meta information
95008 | FORBIDDEN | Check user's permission for doc and folder
95009 | Failed | Check for document read permissions. [Add permissions](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/permission-member/create)
95010 | internal error | Internal error, please try again later.
95011 | internal error | Internal error, please try again later.
95017 | Specific error message | Check if the revison is correct
95018 | Specific error message | See specific error messages for details
95023 | revision too old | The Revision is too old, Please use the latest version number
95024 | Failed | Check parameter validity
95053 | this API does not support the Upgraded Docs(docx), please refer to the https://feishu.feishu.cn/docx/ICI7dp1Uioh4EvxXn0HcxUapn0c using the correct API. | This API does not support the Upgraded Docs(docx), please refer to the [Getting Started with Upgraded Docs OpenAPI](https://feishu.feishu.cn/docx/ICI7dp1Uioh4EvxXn0HcxUapn0c) using the correct API.

For details, refer to [Server-side error codes](https://open.feishu.cn/document/ukTMukTMukTM/ugjM14COyUjL4ITN).
