Skip to content

组装第三方登录URL ​

请求路径 ​

  • 请求方式:POST
  • 请求头:Content-Type:application/json
  • 接口地址:https://gateway.nuoyunapi.com/Api/User/buildThirdLoginUrl
  • 频率限制:10秒30次

请求参数 ​

参数必选类型描述
base_url是string直播间地址,如 https://live.xxx.com/watch/123
user_data是object加密参数,见下表
third_login_time否string13 位毫秒时间戳,不传则用当前时间

user_data 参数结构(加密参数)

参数必选类型描述
uuid是string第三方系统唯一标识
name是string昵称
photo否string头像 URL
phone否string电话号码
sex否integer性别
openid否string微信 openid
appid否string微信公众号/小程序 appid
other1, other2...否string其他自定义字段

请求示例 ​

json
{
  "base_url": "https://live.bnytkj.com/watch/944222547",
  "user_data": {
    "uuid": "184024",
    "name": "测试一下昵称",
    "photo": "https://example.com/avatar.png"
  }
}

响应参数 ​

参数必选类型描述
code是integer状态码:200-成功,400-失败
msg是string提示信息
data是object消息内容

data 参数结构(对应组装步骤 1-5)

参数必选类型描述
step1_user_data_query是string步骤 1:URL 编码后的 user_data
step2_third_login_data是string步骤 2:Base64 编码结果
step3_third_login_time是string步骤 3:13 位时间戳
step4_third_login_sign是string步骤 4:签名
step5_full_url是string步骤 5:完整登录 URL
third_login_data是string可直接用于拼接
third_login_time是string可直接用于拼接
third_login_sign是string可直接用于拼接

响应示例 ​

json
{
  "code": 200,
  "msg": "Success",
  "data": {
    "step1_user_data_query": "uuid=184024&name=%E6%B5%8B%E8%AF%95%E4%B8%80%E4%B8%8B%E6%98%B5%E7%A7%B0",
    "step2_third_login_data": "dXVpZD0xODQwMjQmbmFtZT0lRTYlQjUlOEIlRTglQUYlOTUlRTQlQjglODAlRTQlQjglOEIlRTYlOTglQjUlRTclQTclQjA",
    "step3_third_login_time": "1772091895000",
    "step4_third_login_sign": "0d573af1a538190c20bba9c26511a04e",
    "step5_full_url": "https://live.bnytkj.com/watch/944222547?third_login_data=xxx&third_login_time=xxx&third_login_sign=xxx",
    "third_login_data": "dXVpZD0xODQwMjQmbmFtZT0lRTYlQjUlOEIlRTglQUYlOTUlRTQlQjglODAlRTQlQjglOEIlRTYlOTglQjUlRTclQTclQjA",
    "third_login_time": "1772091895000",
    "third_login_sign": "0d573af1a538190c20bba9c26511a04e"
  }
}

错误码说明 ​

错误码说明
400参数缺失
500API密钥未配置