Check gift sending results
Description
After sending a gift, you can call this interface to pass in the MsgId list to check in batches whether the corresponding gift requests have been sent normally.
Request method and endpoint
- Request method: POST
- Request URL:
https://mini-game-api.zego.im/?Action=DescribeDanmakuMsgResults
- Transmission protocol: HTTPS
- Call frequency limit: 20 times/second (at the room level)
Request parameters
The following request parameter list only lists interface request parameters. For the public parameter list, please refer to Make API requests.
Parameters | Type | Is it required | description |
---|---|---|---|
RoomId | String | 是 | Room ID, defined by you, can be up to 64 characters long. |
MiniGameId | String | 是 | To obtain a game ID, please contact the ZEGOCLOUD technical support team. |
MsgIdList | Array of String | Yes | List of gift message IDs. |
Duration | Number | No | The number of days for the query. By default, records within 30 days are queried and a maximum of 90 days is supported. |
Request example
-
Request URL
Untitledhttps://mini-game-api.zego.im/?Action=DescribeDanmakuMsgResults &<Common request parameters>
1 -
Request message body
Untitled{ "RoomId": "room123", "MiniGameId": "TinyLoveWar", "MsgIdList": [ "10000000001", "10000000002" ], "Duration":30 }
1
Response parameters
Parameters | Type | description |
---|---|---|
Code | Number | Error code. |
Message | String | Description of the request result. |
RequestId | String | Request ID. |
Data | Object | The specific information returned. |
Results | Array of Object | A list of results for successfully consumed gift barrage is processed, and no results are returned for unconsumed gift messages. |
Result | Number | Processing results.
|
Msg | String | Reason for failure. |
MsgId | String | The unique MsgId of the gift corresponding to the processing result. |
Timestamp | Number | The incoming field when Sending gifts, used to distinguish between gift requests sent at different times with the same MsgId. |
Response example
Untitled
{
"Code": 0,
"Message": "succeed",
"RequestId": "abcd123",
"Data": {
"Results": [
{
"Result": 0,
"Msg": "success",
"MsgId": "10000000001",
"Timestamp": 1701244029266
},
{
"Result": 0,
"Msg": "success",
"MsgId": "10000000002",
"Timestamp": 1701244029280
}
]
}
}
1
Return code
The following only lists the return codes related to the interface business logic. For complete return codes, please refer to Global return codes.
Return code | Description | Handling suggestions |
---|---|---|
7202001 | The game was not found, possible reasons include:
|
|
7202002 | MiniGameId format error. | Please confirm whether the format is String. |
Result processing result code
Return code | Description | Handling suggestions |
---|---|---|
10003 | The possible reasons for gift delivery failure include:
| Please contact ZEGOCLOUD technical staff for troubleshooting. |
10004 | No corresponding gift is configured. | Please confirm if the gift has been configured. |