logo
On this page

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.

ParametersTypeIs it requireddescription
RoomIdStringRoom ID, defined by you, can be up to 64 characters long.
MiniGameIdStringTo obtain a game ID, please contact the ZEGOCLOUD technical support team.
MsgIdListArray of StringYesList of gift message IDs.
DurationNumberNoThe 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

    Untitled
    https://mini-game-api.zego.im/?Action=DescribeDanmakuMsgResults
    &<Common request parameters>
    
    1
    Copied!
  • Request message body

    Untitled
    {
      "RoomId": "room123",
      "MiniGameId": "TinyLoveWar",
      "MsgIdList": [
        "10000000001",
        "10000000002"
      ],
      "Duration":30
    }
    
    1
    Copied!

Response parameters

ParametersTypedescription
CodeNumberError code.
MessageStringDescription of the request result.
RequestIdStringRequest ID.
DataObjectThe specific information returned.
ResultsArray of ObjectA list of results for successfully consumed gift barrage is processed, and no results are returned for unconsumed gift messages.
ResultNumberProcessing results.
  • 0:Success.
  • Other: Failure.
MsgStringReason for failure.
MsgIdStringThe unique MsgId of the gift corresponding to the processing result.
TimestampNumberThe 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
Copied!

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 codeDescriptionHandling suggestions
7202001

The game was not found, possible reasons include:

  • Incorrect input of MiniGameId.
  • No permission to access this game.
  • Please check if the MiniGameId is correct.
  • Please contact ZEGOCLOUD business personnel to obtain permission for this game.
7202002MiniGameId format error.Please confirm whether the format is String.

Result processing result code

Return codeDescriptionHandling suggestions
10003

The possible reasons for gift delivery failure include:

  • The user has not joined the game.
  • The room does not exist or has ended.
  • Unknown error.
Please contact ZEGOCLOUD technical staff for troubleshooting.
10004No corresponding gift is configured.Please confirm if the gift has been configured.

Previous

Send gifts

Next

Report live comment-based game information