修改频道观看条件
Last updated
Was this helpful?
Last updated
Was this helpful?
1、接口同时支持HTTP 、HTTPS ,建议使用HTTPS 确保接口安全,接口调用有频率限制,
appId
true
String
timestamp
true
Long
当前13位毫秒级时间戳,3分钟内有效
sign
true
String
channelId
false
String
频道号,不传为通用设置
authSettings
true
Array
rank
true
Integer
主要观看条件为1,次要观看条件为2
enabled
true
String
是否开启条件观看 N:关闭 Y:开启
authType
false
String
wxAuthExpireValue
false
String
authType为wx时,对应的微信授权值,支持以d和h为单位,例如3d表示3天,3h表示3小时
payAuthTips
false
String
当authType为pay时,设置参数,必填。欢迎语标题
price
false
Float
当authType为pay时,设置参数,必填。价格,单位为元
watchEndTime
false
String
当authType为pay时,设置参数,非必填。付费有效截止日期,格式:yyyy-MM-dd HH:mm
validTimePeriod
false
Integer
当authType为pay时,设置参数,非必填。付费有效时长,单位天。当watchEndTime和validTimePeriod都为空时,表示付费永久有效
authCode
false
String
当authType为code时,设置参数,必填。验证码
qcodeTips
false
String
当authType为code时,设置参数,非必填。提示文案
qcodeImg
false
String
当authType为code时,设置参数,非必填。公众号二维码地址
authTips
false
String
当authType为phone时,设置参数,非必填。提示文案
infoFields
false
Array
infoAuthTips
false
String
当authType为info时,设置参数,非必填。欢迎标题
infoDesc
false
String
当authType为info时,设置参数,非必填。提示信息
infoEntryText
false
String
当authType为info时,设置参数,非必填。入口文本
externalKey
false
String
当authType为external时,设置参数,必填。SecretKey
externalUri
false
String
当authType为external时,设置参数,必填。自定义url
externalRedirectUri
false
String
当authType为external时,设置参数,非必填。跳转地址
externalButtonEnabled
false
String
当authType为external时,设置参数,非必填.登录按钮。Y为开启,N为关闭。开启后用户访问链接时,引导页面将显示登录按钮
customKey
false
String
当authType为custom时,设置参数,必填。SecretKey
customUri
false
String
当authType为custom时,设置参数,必填。自定义url
directKey
false
String
当authType为direct时,设置参数,必填。独立授权SecretKey
directKey
false
String
当authType为direct时,设置参数,必填。独立授权SecretKey
privacyStatus
false
String
Y/N 隐私声明开关
privacyContent
false
String
隐私内容,支持富文本
onceWhitelistEnabled
false
String
白名单不允许重复使用,默认为N,Y:是、N:否
name
false
String
当authType为info时,设置参数,非必填。登记信息名,最多为20字符
type
false
String
当authType为info时,设置参数,必填。登记类型 name:姓名 text:文本 mobile:手机号码 number:数字 option:下拉选项
options
false
String
当authType为info时,设置参数,非必填。下拉选项时,下拉的选项值,以英文逗号分割。选项个数上限为8个;选项内容最多为8字符
placeholder
false
String
当authType为info时,设置参数,非必填。文本框输入提示,最多为50字符
sms
false
String
当authType为info时,设置参数,非必填。短信验证开关,Y:开启,N:关闭
请求体参数
code
Integer
status
String
响应状态文本信息
message
String
响应描述信息,当code为400或者500的时候,辅助描述错误原因
data
String
成功时为true,错误时为空
成功示例
异常示例
账号appId【详见】
签名,为32位大写的MD5值,生成签名的appSecret密钥作为通信数据安全的关键信息,严禁保存在客户端直接使用,所有API都必须通过客户自己服务器中转调用POLYV服务器获取响应数据
【详见】
观看条件设置 【详见】
pay:付费观看 code:验证码观看 phone:白名单观看 注:需确认对应rank的白名单是否存在,否则需要先调用新增再设置观看条件 info:登记观看 custom:自定义授权观看 external:外部授权观看 direct:独立授权观看 public: 公开观看 wx:微信授权观看
当authType为info时,设置参数,必填。登记观看信息,上限为5个【详见】
响应状态码,200为成功返回,非200为失败【详见】
快速接入基础代码请下载相关依赖源码, ,下载后加入到自己的源码工程中即可。测试用例中的HttpUtil.java 和 LiveSignUtil.java 都包含在下载文件中。
强烈建议您使用完成API的功能对接,直播Java SDK 对API调用逻辑、异常处理、数据签名、HTTP请求线程池进行了统一封装和优化。
系统全局错误说明详见