调用 GetActivityRedPacket
,获取指定直播间内指定红包的配置信息,包括红包 ID、状态、类型、个数、参与条件等。
请求频率:单用户请求频率限制为 10 次/秒。
下表仅列出该接口特有的请求参数和部分公共参数。更多信息详见公共参数。
参数 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | GetActivityRedPacket | 接口名称。当前 API 的名称为 GetActivityRedPacket 。 |
Version | String | 是 | 2023-08-01 | 接口版本。当前 API 的版本为 2023-08-01 。 |
ActivityID | Long | 是 | 182492****234844 | 直播间 ID。您可通过调用 ListActivityAPI 接口获取 ID。 |
RedPacketID | Long | 是 | 182509****702096 | 红包 ID。您可通过调用 ListActivityRedPacket 或 CreateActivityRedPacket 接口获取 ID。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
ActivityID | Long | 182497****122003 | 直播间 ID。 |
RedPacketID | Long | 182509****702096 | 红包 ID。 |
RedPacketStatus | Integer |
| 红包状态。取值如下:
|
RedPacketType | Integer |
| 红包类型。取值如下:
说明 您可以进行二次开发,按照红包中奖结果,向抢到红包的观众发放积分或让观众完成现金红包提现。详见接入流程。 |
TotalAmount | Integer |
| 红包总金额或总积分。
|
RewardsPointsConfig | Object of RewardsPointsConfig |
| 积分红包配置。 说明 该参数仅在 |
RedPacketNumber | Integer |
| 红包个数。 说明 该参数仅在 |
OpenRedPacketType | Integer |
| 开奖方式。取值如下:
|
DeadLine | Integer |
| 开奖倒计时。单位为分钟。 说明 该参数仅在 |
IsOpenSmsNotification | Integer |
| 是否开启短信提醒。取值如下:
|
RedPacketCoverImage | String |
| 观看页展示的红包图标的 URL。 |
ClaimSuccessText | String | 恭喜你,抢到积分红包,请联系主办方领取 | 观众抢到红包时的提示文案。 |
ClaimFailureText | String | 很遗憾,您没有抢到红包 | 观众未抢到红包时的提示文案。 |
AwardCondition | Object of AwardCondition |
| 参与条件配置。 |
BarragePwd | String |
| 弹幕口令。 |
RangeStatus | Integer |
| 中奖条件。取值如下:
|
RepeatedAwardLimit | Integer |
| 同一观众在当前直播间 30 天内允许中奖(包括实时抽奖和红包)的次数。 说明 该参数仅在 |
VipUserInfoId | Long |
| 优先中奖名单 ID。您可调用 GetVipOrBlackListUserInfo 接口,通过传入直播间 ID 和优先中奖名单 ID,获取名单中的用户信息。 |
BlackUserInfoId | Long |
| 中奖黑名单 ID。您可调用 GetVipOrBlackListUserInfo 接口,通过传入直播间 ID 和中奖黑名单 ID,获取名单中的用户信息。 |
EnableCustomRedirect | Boolean |
| 是否开启自定义地址提现跳转功能。取值如下:
说明 当
|
CustomRedirectUrl | String |
| 自定义地址。 说明 该参数仅在 |
EnableMiniApp | Boolean |
| 是否开启微信小程序提现跳转功能。取值如下:
|
MiniAppId | String |
| 微信小程序的 App ID,跳转后的页面属于该微信小程序。 说明 该参数仅在 |
MiniAppRedirectUrl | String |
| 跳转后的页面在微信小程序中的相对路径。 说明 该参数仅在 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
AmountCalculationType | Integer |
| 金额计算方式。取值如下:
|
RewardsPointsUnit | String | 积分 | 积分单位。 |
FixedRewardPointConfigs | Array of FixedRewardPointConfigs |
| 指定金额的积分红包配置。 说明 该参数仅在 |
RewardsPointsBatch | String | 123214****3214123 | 批次号,用于区分不同批次的积分。观众参与抢红包后,您可根据批次号和中奖金额,向抢到红包的观众发送积分。 |
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Questionnaire | String |
| 问卷参与条件。取值如下:
|
Vote | String |
| 投票参与条件。取值如下:
|
CheckIn | String |
| 签到参与条件。取值如下:
|
Quiz | String |
| 答题或简答参与条件。取值如下:
|
RightQuiz | String |
| 答题或简答参与条件。取值如下:
|
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
RewardPointAmount | Integer | 100 | 积分金额。 |
RewardPointNumber | Integer | 10 | 红包个数。 |
GET https://livesaas.volcengineapi.com/?Action=GetActivityRedPacket&Version=2023-08-01&ActivityID=182492****234844&RedPacketID=182509****702096
{ "ResponseMetadata": { "RequestId": "20230604110420****100232280022D31", "Action": "GetActivityRedPacket", "Version": "2023-08-01", "Service": "livesaas", "Region": "cn-north-1", "SystemTime": 1697446406 }, "Result": { "TotalAmount": 10000, "RedPacketNumber": 10, "BarragePwd": "新年快乐", "DeadLine": 5, "ActivityID": 182497****122003, "RedPacketID": 182509****702096, "RedPacketStatus": 0, "RedPacketCoverImage": "https://www.example.com/a.png", "RedPacketType": 0, "OpenRedPacketType": 0, "IsOpenSmsNotification": 0, "RewardsPointsConfig": { "AmountCalculationType": 0, "RewardsPointsUnit": "积分", "FixedRewardPointConfigs": [ { "RewardPointAmount": 100, "RewardPointNumber": 10 } ], "RewardsPointsBatch": "123214****3214123" }, "RangeStatus": 0, "AwardCondition": { "Quiz": "all", "Questionnaire": "all", "CheckIn": "all", "Vote": "1", "RightQuiz": "all" }, "VipUserInfoId": 162****099, "BlackUserInfoId": 162****100, "RepeatedAwardLimit": 1, "ClaimSuccessText": "恭喜你,抢到积分红包,请联系主办方领取", "ClaimFailureText": "很遗憾,您没有抢到红包", "EnableCustomRedirect": false, "CustomRedirectUrl": "https://www.example.com", "EnableMiniApp": true, "MiniAppId": "1234****91011", "MiniAppRedirectUrl": "test=1" } }