# Query the number of pushers and readers of batch messages

After [sending messages in batches](https://open.feishu.cn/document/ukTMukTMukTM/ucDO1EjL3gTNx4yN4UTM), you can use this interface to query the total number of people who have received the message push and the number of people who have read the message.

## Prerequisites

The application needs to enable [bot capability](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-enable-bot-ability).

## Precautions
- You can only query messages sent through the [batch message sending](https://open.feishu.cn/document/ukTMukTMukTM/ucDO1EjL3gTNx4yN4UTM) interface within 30 days.
- The data returned by this interface is the snapshot data at the time of query.

## Request

Facts | &nbsp;
---|---
HTTP URL | https://open.feishu.cn/open-apis/im/v1/batch_messages/:batch_message_id/read_user
HTTP Method | GET
Rate Limit | [1000 per minute & 50 per second](https://open.feishu.cn/document/ukTMukTMukTM/uUzN04SN3QjL1cDN)
Supported app types | Custom App、Store App
Required scopes<br>**To use this API, you must have at least 1 of the listed scopes.**<br>Enable any scope from the list | Send batch messages to members from one or more departments(im:message:send_multi_depts)<br>Send batch messages to multiple users(im:message:send_multi_users)

### Request header

Parameter | Type | Required | Description
---|---|---|---
Authorization | string | Yes | `tenant_access_token`<br>**Value format**: "Bearer `access_token`"<br>**Example value**: "Bearer t-7f1bcd13fc57d46bac21793a18e560"<br>[How to choose and get access token](https://open.feishu.cn/document/uAjLw4CM/ugTN1YjL4UTN24CO1UjN/trouble-shooting/how-to-choose-which-type-of-token-to-use)

### Path parameters

Parameter | Type | Description
---|---|---
batch_message_id | string | The batch message task ID to be queried. This ID is the `message_id` field in the return value of the [Batch Send Messages]( https://open.feishu.cn/document/ukTMukTMukTM/ucDO1EjL3gTNx4yN4UTM) interface, which is used to identify a batch message sending request.<br>**Example value**: "bm_dc13264520392913993dd051dba21dcf"

## Response

### Response body

Parameter | Type | Description
---|---|---
code | int | Error codes, fail if not zero
msg | string | Error descriptions
data | \- | \-
read_user | batch_message_read_user | Read status of the batch message
read_count | string | Number of users who have read the batch message
total_count | string | Total number of users to whom the batch message is pushed

### Response body example
```json
{
    "code": 0,
    "data": {
        "read_user": {
            "read_count": "10",
            "total_count": "100"
        }
    },
    "msg": "ok"
}
```

### Error code

HTTP status code | Error code | Description | Troubleshooting suggestions
---|---|---|---
400 | 230001 | Your request contains an invalid request parameter. | Parameter error. Please check the input parameter according to the error message returned by the interface and refer to the document.
400 | 230012 | Bot is NOT the sender of the message. | The robot is not the sender of the message. The application robot can only operate the messages it sends.
400 | 230027 | Lack of necessary permissions. | You are not authorized to perform this operation. Possible reasons are:<br>1. Lack of corresponding permissions, please troubleshoot according to the error message.<br>2. User authorization information was not checked.<br>3. If the bot needs to operate in external groups, you must first enable external sharing capabilities for it. For more details, refer to [Bot support for external groups and chats with external users](https://open.feishu.cn/document/uAjLw4CM/ukzMukzMukzM/develop-robots/add-bot-to-external-group).
400 | 230030 | The message id is invalid, record not found. | The message ID is invalid and the record was not found. You need to check and pass in the correct batch_message_id parameter and try again.

For more error code information, see [General error codes](https://open.feishu.cn/document/ukTMukTMukTM/ugjM14COyUjL4ITN).

