跳转至
400-881-9892

文档中心

官方文档,可查阅产品介绍、快速入门、用户指南、开发指南、API参考、SDK参考、帮助等信息。

文档中心 互动课堂

获取房间信息

请求示例

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
<?php

use TalkCloud\Api\RoomSdk;

$config = [
    'Tk_Company_Key' => '你的企业Key',
];

$sdk = new RoomSdk($config);

$result = $sdk->getInfo([
    'serial' => "1213123"
]);

$resultData = json_decode($result, true);

其它请求参数请参考获取房间信息API接口文档

返回结构说明

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{
    "result": 0,
    "data": {
        "serial": "1137478806",
        "roomstate": "0",
        "roomtype": "3",
        "roomname": "方法",
        "starttime": "1713171079",
        "endtime": "1713173779",
        "createtime": "1713171080",
        "chairmanpwd": "2106",
        "passwordrequired": "1",
        "assistantpwd": "5673",
        "confuserpwd": "4923",
        "thirdroomid": "",
        "patrolpwd": "1039",
        "auditorspwd": "5807",
        "auditorsrequired": "1",
        "roomAttrInfo": {
            "maxvideo": "24",
            "autoopenav": "0",
            "autoopenaudio": "0",
            "autoopenvideo": "0",
            "showYourself": "0",
            "appstudentsshowpage": "0",
            "ismp4record": 1,
            "isrtmp4record": 0,
            "isAiClass": 0,
            "roomthemeid": "1",
            "videotype": 1,
            "videoframerate": "10",
            "roomlayout": "1",
            "classlogourl": "",
            "rtmp_external_source": {
                "push_url": "",
                "live_id": ""
            },
            "user_microphone": "0"
        },
        "enterurl": [
            {
                "url": "https:///enterRoom/1137478806/10785/1/0",
                "usertype": 0
            },
            {
                "url": "https:///enterRoom/1137478806/10785/1/0",
                "usertype": 1
            },
            {
                "url": "https:///enterRoom/1137478806/10785/1/2",
                "usertype": 2
            },
            {
                "url": "https:///enterRoom/1137478806/10785/1/0",
                "usertype": 4
            }
        ],
        "rtmp_external_source": {
            "push_url": "rtmp://tx-push-record.talk-cloud.net/live/",
            "live_id": "1108579068?txSecret=ca3ee97698e6de476d6b27dd093481fd&txTime=6A0D2E18"
        },
        "entryurl": "https:///WebAPI/entry?domain=xzj&serial=1137478806&username=asdas&usertype=0&ts=1713235505&auth=a8128d5430b690d22a2f6944c53cf69e&userpassword=28c1dd6cbb70b563bbc57af9bba0234f&pid=1"
    },
    "msg": ""
}

返回参数说明请参考获取房间信息API接口文档

建议在业务代码中统一先 json_decode($result, true) 后再取字段。

错误码说明