跳转至内容
Tutorio 免费开始
开发者

基于 Tutorio API 构建应用

创建白板、登录用户并读取出勤、录制和转写内容。

https://tutorio.app/api/v1 openapi.json

新手上路

API 使用基于 HTTPS 的纯 JSON。只需三步,即可从零开始进入直播课堂。

  1. 1

    生成密钥

    在你的 Tutorio 账户中打开“集成”并创建一个 API 密钥。密钥仅显示一次,请妥善复制保存。

  2. 2

    验证连接

    调用 GET /me。它将返回该密钥所属的账户。

  3. 3

    创建白板

    调用 POST /boards,然后为每个人创建一个登录链接。

检查密钥
curl https://tutorio.app/api/v1/me \
  -H "Authorization: Bearer tut_your_key"

身份验证

在每次调用时将你的密钥作为 bearer 令牌发送。密钥以 tut_ 开头,归属于处于有效方案中的导师账户,并可访问该账户的白板(对于组织,则是其导师的白板)。

请求头
Authorization: Bearer tut_your_key

请将密钥保存在服务器上。切勿将其放入网页或应用程序中。

错误与频次限制

调用失败时会返回状态码和一个固定格式的主体。每个密钥每分钟大约可发送 120 个请求;超出后你将收到一个带有时长(以秒为单位)Retry-After 响应头的 429。等待相应时间后即可继续。

错误响应体
{
  "error": {
    "code": "not_found",
    "message": "There is no board with that code on this account."
  }
}
错误代码
bad_json400响应体不是有效的 JSON。
invalid_request400缺少某个字段或字段不允许。错误信息会说明具体情况。
missing_key401Authorization 请求头中未发送密钥。
invalid_key401密钥错误或已被删除。
plan_required402账户的 Tutorio 套餐未激活。
not_a_tutor403该密钥属于一个并非导师的账户。
not_found404在此账户中未找到该代码或 id 对应的内容。
rate_limited429每分钟请求超过约 120 次。请等待 Retry-After。
server_error500我们的服务器出错了。请重试。

账户

检查密钥

GET/api/v1/me

说明密钥所属的账户。可用于测试连接。

请求
curl https://tutorio.app/api/v1/me \
  -H "Authorization: Bearer tut_your_key"
响应 · 200
{
  "id": "6f1c…",
  "name": "Maya Patel",
  "email": "maya@example.com",
  "key": {
    "id": "key_x7Kp2mQ9aB4cDe",
    "name": "Booking site"
  }
}

白板

创建白板

POST/api/v1/boards

创建一个白板并返回其链接。发送 external_id(你用于课程、学生或预约的自定义 id),以便安全地重复调用:相同的 id 总是返回相同的白板。

请求体 (JSON)
name 字符串 白板的名称。最多 80 个字符。
external_id 字符串 你为该白板用途设置的 id。再次使用它请求将返回相同的白板。
host_email 字符串 将画板分配给你所在机构的导师,而不是你自己。
请求
curl -X POST https://tutorio.app/api/v1/boards \
  -H "Authorization: Bearer tut_your_key" \
  -H "Content-Type: application/json" \
  -d '{"name": "Maya · Year 9 Maths", "external_id": "lesson-4821"}'
响应 · 201
{
  "code": "qm7-kx2p-vdr",
  "name": "Maya · Year 9 Maths",
  "url": "https://tutorio.app/whiteboard/qm7-kx2p-vdr",
  "external_id": "lesson-4821",
  "created": true,
  "created_at": "2026-01-12T09:30:00Z",
  "host_id": "6f1c…",
  "people_in_room": 0
}

获取白板列表

GET/api/v1/boards

你的画板,最近打开的排在最前。

查询
limit integer 返回数量。默认 50,最多 200。
external_id 字符串 仅限为此 id 创建的画板。
name 字符串 仅限名称包含此文本的画板。
请求
curl https://tutorio.app/api/v1/boards \
  -H "Authorization: Bearer tut_your_key"
响应 · 200
{
  "boards": [
    {
      "code": "qm7-kx2p-vdr",
      "name": "Maya · Year 9 Maths",
      "url": "https://tutorio.app/whiteboard/qm7-kx2p-vdr",
      "people_in_room": 2
    }
  ]
}

获取白板详情

GET/api/v1/boards/{code}

单个画板,包含当前在线人数。

路径
code 字符串 必填画板代码:其链接的最后一部分。
请求
curl https://tutorio.app/api/v1/boards/qm7-kx2p-vdr \
  -H "Authorization: Bearer tut_your_key"
响应 · 200
{
  "code": "qm7-kx2p-vdr",
  "name": "Maya · Year 9 Maths",
  "url": "https://tutorio.app/whiteboard/qm7-kx2p-vdr",
  "people_in_room": 2
}

重命名白板

PATCH/api/v1/boards/{code}

路径
code 字符串 必填画板代码:其链接的最后一部分。
请求体 (JSON)
name 字符串 新名称。
请求
curl -X PATCH https://tutorio.app/api/v1/boards/qm7-kx2p-vdr \
  -H "Authorization: Bearer tut_your_key" \
  -H "Content-Type: application/json" \
  -d '{"name": "Maya · Year 10 Maths"}'
响应 · 200
{
  "code": "qm7-kx2p-vdr",
  "name": "Maya · Year 10 Maths",
  "url": "https://tutorio.app/whiteboard/qm7-kx2p-vdr"
}

删除白板

DELETE/api/v1/boards/{code}

删除画板、其上的所有内容及上传文件。此操作无法撤销。

路径
code 字符串 必填画板代码:其链接的最后一部分。
请求
curl -X DELETE https://tutorio.app/api/v1/boards/qm7-kx2p-vdr \
  -H "Authorization: Bearer tut_your_key"
响应 · 200
{
  "deleted": true,
  "code": "qm7-kx2p-vdr"
}

创建登录链接

POST/api/v1/boards/{code}/links

一个能让用户直接进入画板且已登录的链接。请将其放置在你的“加入”按钮后。参与者链接在过期前有效;发送 external_id 可让该用户始终返回同一个 Tutorio 账户。主持人链接以画板导师身份登录:仅使用一次且持续十分钟,因此请在他们点击时生成。

路径
code 字符串 必填画板代码:其链接的最后一部分。
请求体 (JSON)
role 字符串 “participant”(默认)或“host”。
name 字符串 房间显示的名称。参与者必填。
external_id 字符串 你为该用户设置的 id,以便他们保留一个账户。
email 字符串 他们的电子邮箱(如有)。仅供你的记录保存。
expires_in integer 链接失效前的秒数。参与者链接默认持续一天,最多 90 天;主持人链接持续十分钟,最多一小时。
embed 布尔值 true 表示改为生成用于你页面中 iframe 的链接:url 是框架的 src,fallback_url 是独立网页形式的画板。画板导师必须已在“集成”中允许你的网站,且参与者需要 external_id。嵌入链接仅登录该特定房间,且仅能在框架内使用。请参阅“嵌入”。
请求
curl -X POST https://tutorio.app/api/v1/boards/qm7-kx2p-vdr/links \
  -H "Authorization: Bearer tut_your_key" \
  -H "Content-Type: application/json" \
  -d '{"role": "participant", "name": "Maya Patel", "external_id": "student-193"}'
响应 · 201
{
  "url": "https://tutorio.app/whiteboard/go/Hq3…",
  "role": "participant",
  "expires_at": "2026-01-13T09:30:00Z",
  "single_use": false
}

出勤记录

白板会话列表

GET/api/v1/boards/{code}/sessions

画板的每次使用情况:谁来过、何时来以及时长。

路径
code 字符串 必填画板代码:其链接的最后一部分。
查询
limit integer 返回数量。默认 50,最多 200。
请求
curl https://tutorio.app/api/v1/boards/qm7-kx2p-vdr/sessions \
  -H "Authorization: Bearer tut_your_key"
响应 · 200
{
  "sessions": [
    {
      "id": "ses_p4Vn81LkQe2zXa",
      "started_at": "2026-01-12T16:00:04Z",
      "ended_at": "2026-01-12T16:58:41Z",
      "live": false,
      "duration_seconds": 3517,
      "participants": [
        {
          "id": "6f1c…",
          "name": "Mr Okafor",
          "role": "host",
          "joined_at": "2026-01-12T16:00:04Z",
          "left_at": "2026-01-12T16:58:41Z",
          "duration_seconds": 3517,
          "visits": 1
        },
        {
          "id": "a20b…",
          "name": "Maya Patel",
          "role": "participant",
          "external_id": "student-193",
          "joined_at": "2026-01-12T16:01:30Z",
          "left_at": "2026-01-12T16:58:02Z",
          "duration_seconds": 3392,
          "visits": 2
        }
      ]
    }
  ]
}

所有会话

GET/api/v1/sessions

所有画板的会话,最新的排在最前。

查询
since 字符串 仅限在此时间或之后开始的会话(RFC 3339)。
limit integer 返回数量。默认 50,最多 200。
请求
curl https://tutorio.app/api/v1/sessions \
  -H "Authorization: Bearer tut_your_key"
响应 · 200
{
  "sessions": []
}

获取会话详情

GET/api/v1/sessions/{id}

路径
id 字符串 必填会话 id,例如 ses_p4Vn81LkQe2zXa。
请求
curl https://tutorio.app/api/v1/sessions/ses_p4Vn81LkQe2zXa \
  -H "Authorization: Bearer tut_your_key"
响应 · 200
{
  "id": "ses_p4Vn81LkQe2zXa",
  "live": true,
  "started_at": "2026-01-12T16:00:04Z",
  "ended_at": null,
  "participants": []
}

课堂录屏

获取录屏列表

GET/api/v1/recordings

Finished recordings, newest first. Use /boards/{code}/recordings for one board.

查询
limit integer 返回数量。默认 50,最多 200。
请求
curl https://tutorio.app/api/v1/recordings \
  -H "Authorization: Bearer tut_your_key"
响应 · 200
{
  "recordings": [
    {
      "id": "3b9f0c2e7a1d4e68",
      "status": "done",
      "started_at": "2026-01-12T16:00:10Z",
      "duration_seconds": 3490,
      "people": [
        "Mr Okafor",
        "Maya Patel"
      ],
      "media_url": "https://tutorio.app/api/v1/recordings/3b9f0c2e7a1d4e68/media",
      "has_transcript": true
    }
  ]
}

获取录屏详情

GET/api/v1/recordings/{id}

带有摘要和完整文字记录的录制文件(状态为“done”时)。

路径
id 字符串 必填录制文件的 id。
请求
curl https://tutorio.app/api/v1/recordings/3b9f0c2e7a1d4e68 \
  -H "Authorization: Bearer tut_your_key"
响应 · 200
{
  "id": "3b9f0c2e7a1d4e68",
  "status": "done",
  "summary": {
    "title": "Solving linear equations",
    "overview": "Maya worked through…",
    "covered": [
      "Balancing both sides"
    ],
    "went_well": [
      "Checked every answer"
    ],
    "work_on": [
      "Negative coefficients"
    ],
    "next_steps": [
      "Ten mixed questions"
    ]
  },
  "transcript": [
    {
      "at": "00:14",
      "speaker": "Mr Okafor",
      "text": "Let's start with number three."
    }
  ]
}

下载录屏

GET/api/v1/recordings/{id}/media

作为单个视频文件的录制文件本身。与其他调用一样发送密钥。

路径
id 字符串 必填录制文件的 id。
请求
curl https://tutorio.app/api/v1/recordings/3b9f0c2e7a1d4e68/media \
  -H "Authorization: Bearer tut_your_key" \
  -o recording.webm

Webhooks

添加 Webhook

POST/api/v1/webhooks

Tutorio will POST each event to your URL as it happens. Leave events out to get all of them. The secret in the answer signs every delivery; it is shown once, here, and never again (not in the list either), so keep it. People's names are left out of what is sent unless you ask for them with include_names: without it each participant comes with their id, your external_id for them, their role and their times, and a recording comes without its list of people and without its summary (which is written about the lesson and can name a child): the event carries "summary_available": true instead, and GET /recordings/{id} has the summary and the transcript.

请求体 (JSON)
url 字符串 必填发送事件的地址。必须是 https。
events 数组 所需事件类型。留空表示全部。
include_names 布尔值 true 表示发送参与者姓名、录制中人员的姓名及录制摘要。省略或设为 false 时,推送内容仅包含 ID、角色和时间。如无必要,请勿请求姓名:房间内的大多数人是儿童。
请求
curl -X POST https://tutorio.app/api/v1/webhooks \
  -H "Authorization: Bearer tut_your_key" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/hooks/tutorio", "events": ["session.ended", "recording.ready"]}'
响应 · 201
{
  "id": "hook_Ab3dE6gH9jK2mN",
  "url": "https://example.com/hooks/tutorio",
  "events": [
    "session.ended",
    "recording.ready"
  ],
  "include_names": false,
  "secret": "whsec_…"
}

获取 Webhook 列表

GET/api/v1/webhooks

你的 Webhook。不包含其密钥:密钥仅在创建 Webhook 时显示一次。

请求
curl https://tutorio.app/api/v1/webhooks \
  -H "Authorization: Bearer tut_your_key"
响应 · 200
{
  "webhooks": [
    {
      "id": "hook_Ab3dE6gH9jK2mN",
      "url": "https://example.com/hooks/tutorio",
      "events": [
        "session.ended"
      ],
      "include_names": false,
      "disabled": false,
      "last_status": 200
    }
  ]
}

移除 Webhook

DELETE/api/v1/webhooks/{id}

路径
id 字符串 必填Webhook 的 ID,例如 hook_Ab3dE6gH9jK2mN。
请求
curl -X DELETE https://tutorio.app/api/v1/webhooks/hook_Ab3dE6gH9jK2mN \
  -H "Authorization: Bearer tut_your_key"
响应 · 200
{
  "deleted": true
}

Webhook 事件

在“集成”中或使用 POST /webhooks 添加 URL,Tutorio 将以 JSON 格式向其发送每个事件。请在 15 秒内响应任意 2xx 状态码。否则,我们将在 5 秒和 30 秒后重试。每次尝试都会在投递日志中保留一周,“发送测试”会发送一个 ping。

每个正文都具有相同的信封结构:id、type、created(Unix 时间戳秒)和 data。

除非您主动请求,否则不会包含人员姓名。每个参与者都包含一个 id、您分配给他们的 external_id、一个 role 及其时间戳,如下方示例所示。使用 include_names 创建 Webhook(或在“集成”中开启“包含姓名”),则每个参与者还拥有一个 name,录制内容则拥有一个 people 列表。

session.started首位成员进入白板。
session.started
{
  "id": "evt_Jq8sT2bN5wYc1R",
  "type": "session.started",
  "created": 1768233604,
  "data": {
    "board": {
      "code": "qm7-kx2p-vdr",
      "external_id": "lesson-4821",
      "name": "Maya · Year 9 Maths",
      "url": "https://tutorio.app/whiteboard/qm7-kx2p-vdr"
    },
    "session": {
      "id": "ses_p4Vn81LkQe2zXa",
      "started_at": "2026-01-12T16:00:04Z"
    }
  }
}
participant.joined有成员进入白板。
participant.joined
{
  "id": "evt_Jq8sT2bN5wYc1R",
  "type": "participant.joined",
  "created": 1768233604,
  "data": {
    "board": {
      "code": "qm7-kx2p-vdr",
      "external_id": "lesson-4821",
      "name": "Maya · Year 9 Maths",
      "url": "https://tutorio.app/whiteboard/qm7-kx2p-vdr"
    },
    "participant": {
      "external_id": "student-193",
      "id": "a20b4c6d-0000-4000-8000-000000000002",
      "joined_at": "2026-01-12T16:01:30Z",
      "role": "participant"
    },
    "session": {
      "id": "ses_p4Vn81LkQe2zXa",
      "started_at": "2026-01-12T16:00:04Z"
    }
  }
}
participant.left有成员离开白板。
participant.left
{
  "id": "evt_Jq8sT2bN5wYc1R",
  "type": "participant.left",
  "created": 1768233604,
  "data": {
    "board": {
      "code": "qm7-kx2p-vdr",
      "external_id": "lesson-4821",
      "name": "Maya · Year 9 Maths",
      "url": "https://tutorio.app/whiteboard/qm7-kx2p-vdr"
    },
    "participant": {
      "external_id": "student-193",
      "id": "a20b4c6d-0000-4000-8000-000000000002",
      "left_at": "2026-01-12T16:58:02Z",
      "role": "participant"
    },
    "session": {
      "id": "ses_p4Vn81LkQe2zXa",
      "started_at": "2026-01-12T16:00:04Z"
    }
  }
}
session.ended所有成员均已离开,包含完整的出勤记录。
session.ended
{
  "id": "evt_Jq8sT2bN5wYc1R",
  "type": "session.ended",
  "created": 1768233604,
  "data": {
    "board": {
      "code": "qm7-kx2p-vdr",
      "external_id": "lesson-4821",
      "name": "Maya · Year 9 Maths",
      "url": "https://tutorio.app/whiteboard/qm7-kx2p-vdr"
    },
    "session": {
      "board": {
        "code": "qm7-kx2p-vdr",
        "external_id": "lesson-4821",
        "name": "Maya · Year 9 Maths",
        "url": "https://tutorio.app/whiteboard/qm7-kx2p-vdr"
      },
      "duration_seconds": 3517,
      "ended_at": "2026-01-12T16:58:41Z",
      "id": "ses_p4Vn81LkQe2zXa",
      "live": false,
      "participants": [
        {
          "duration_seconds": 3517,
          "id": "6f1c2d3e-0000-4000-8000-000000000001",
          "joined_at": "2026-01-12T16:00:04Z",
          "left_at": "2026-01-12T16:58:41Z",
          "role": "host",
          "visits": 1
        },
        {
          "duration_seconds": 3392,
          "external_id": "student-193",
          "id": "a20b4c6d-0000-4000-8000-000000000002",
          "joined_at": "2026-01-12T16:01:30Z",
          "left_at": "2026-01-12T16:58:02Z",
          "role": "participant",
          "visits": 2
        }
      ],
      "started_at": "2026-01-12T16:00:04Z"
    }
  }
}
recording.ready录屏生成完毕,支持在线播放。
recording.ready
{
  "id": "evt_Jq8sT2bN5wYc1R",
  "type": "recording.ready",
  "created": 1768233604,
  "data": {
    "board": {
      "code": "qm7-kx2p-vdr",
      "external_id": "lesson-4821",
      "name": "Maya · Year 9 Maths",
      "url": "https://tutorio.app/whiteboard/qm7-kx2p-vdr"
    },
    "recording": {
      "board": {
        "code": "qm7-kx2p-vdr",
        "name": "Maya · Year 9 Maths",
        "url": "https://tutorio.app/whiteboard/qm7-kx2p-vdr"
      },
      "bytes": 48211934,
      "duration_seconds": 3511,
      "ended_at": "2026-01-12T16:58:41Z",
      "has_transcript": false,
      "id": "3b9f0c2e7a1d4e68",
      "media_url": "https://tutorio.app/api/v1/recordings/3b9f0c2e7a1d4e68/media",
      "mime_type": "video/webm",
      "page_url": "https://tutorio.app/tutor/whiteboard/recording/3b9f0c2e7a1d4e68",
      "started_at": "2026-01-12T16:00:10Z",
      "status": "ready"
    }
  }
}
recording.transcribed录屏逐字稿与摘要已生成完毕。
recording.transcribed
{
  "id": "evt_Jq8sT2bN5wYc1R",
  "type": "recording.transcribed",
  "created": 1768233604,
  "data": {
    "board": {
      "code": "qm7-kx2p-vdr",
      "external_id": "lesson-4821",
      "name": "Maya · Year 9 Maths",
      "url": "https://tutorio.app/whiteboard/qm7-kx2p-vdr"
    },
    "recording": {
      "board": {
        "code": "qm7-kx2p-vdr",
        "name": "Maya · Year 9 Maths",
        "url": "https://tutorio.app/whiteboard/qm7-kx2p-vdr"
      },
      "bytes": 48211934,
      "duration_seconds": 3511,
      "ended_at": "2026-01-12T16:58:41Z",
      "has_transcript": true,
      "id": "3b9f0c2e7a1d4e68",
      "media_url": "https://tutorio.app/api/v1/recordings/3b9f0c2e7a1d4e68/media",
      "mime_type": "video/webm",
      "page_url": "https://tutorio.app/tutor/whiteboard/recording/3b9f0c2e7a1d4e68",
      "started_at": "2026-01-12T16:00:10Z",
      "status": "done",
      "summary_available": true
    }
  }
}
board.created白板已通过 API 成功创建。
board.created
{
  "id": "evt_Jq8sT2bN5wYc1R",
  "type": "board.created",
  "created": 1768233604,
  "data": {
    "board": {
      "code": "qm7-kx2p-vdr",
      "external_id": "lesson-4821",
      "name": "Maya · Year 9 Maths",
      "url": "https://tutorio.app/whiteboard/qm7-kx2p-vdr"
    }
  }
}

验证签名

每次推送均包含 Tutorio-Signature 请求头:t=<unix>,v1=<hex>。其中的十六进制串是使用您的 Webhook 密钥(以 whsec_ 开头,仅在创建时显示一次)对 <t>.<body> 计算所得的 HMAC-SHA256 哈希值。请自行计算并核对该签名,同时直接拒收超过数分钟的请求。

verify.js
const crypto = require('crypto');

// rawBody is the request body exactly as received, before JSON.parse.
function verify(secret, header, rawBody) {
  const parts = Object.fromEntries(header.split(',').map((p) => p.trim().split('=')));
  const want = crypto.createHmac('sha256', secret)
    .update(parts.t + '.' + rawBody)
    .digest('hex');
  const fresh = Math.abs(Date.now() / 1000 - Number(parts.t)) < 300;
  return fresh && parts.v1.length === want.length &&
    crypto.timingSafeEqual(Buffer.from(parts.v1), Buffer.from(want));
}

网页嵌入

最简单的接入方式是在你产品中的任意位置放置一个“加入”按钮:看板会作为独立页面打开,可在当前标签页或新标签页中显示。

加入按钮
<!-- The board opens as its own page, so cameras and microphones work. -->
<a href="/lessons/4821/join" target="_blank" rel="noopener">Join lesson</a>

将课堂直接嵌入你的页面

若要在你自己的课程页面中显示实时互动房间,请将其放入 iframe 中。实现这一点需要注意三点:

  • 允许你的网站。托管看板的导师可在“集成”、“开发者”、“嵌入白板”下方添加你网站的具体地址(例如 https://lessons.example.com)。仅限 Https,不支持通配符,最多十个网站。浏览器会拒绝所有其他网站以及所有其他 Tutorio 页面。
  • Make an embed link. Send "embed": true when you create a sign-in link and use its url as the frame's src. A participant needs an external_id. An embed link only works in a frame: it signs the person in to that one room, never to their Tutorio account.
  • 传递相机权限。iframe 需要包含下方的 allow 属性,否则浏览器将阻止其中的摄像头、麦克风和屏幕共享功能。房间会在缺失时给出提示。
lesson.js
// The lesson page in your product, rendered on your server:
app.get('/lessons/:id', async (req, res) => {
  const lesson = await db.lessons.find(req.params.id);
  const user = req.user;
  const board = await tutorio('POST', '/boards', {
    name: lesson.title,
    external_id: 'lesson-' + lesson.id,
  });

  // "embed": true makes a link that only works as the src of a frame.
  // Make a fresh one each time the page is rendered.
  const link = await tutorio('POST', '/boards/' + board.code + '/links', {
    role: user.isTutor ? 'host' : 'participant',
    name: user.name,
    external_id: 'user-' + user.id,
    embed: true,
  });

  res.render('lesson', { roomSrc: link.url, roomTab: link.fallback_url });
});
lesson.html
<iframe id="room"
  src="{{ roomSrc }}"
  allow="camera; microphone; display-capture; fullscreen; clipboard-write; autoplay"
  allowfullscreen
  style="width:100%;height:720px;border:0"
  title="Whiteboard"></iframe>
<a href="{{ roomTab }}" target="_blank" rel="noopener">Open in a new tab</a>

<script>
  window.addEventListener('message', function (e) {
    if (e.origin !== 'https://tutorio.app') return;
    if (e.source !== document.getElementById('room').contentWindow) return;
    switch (e.data && e.data.type) {
      case 'tutorio:ready':  break; // the room has loaded
      case 'tutorio:joined': break; // e.data.role is "host" or "participant"
      case 'tutorio:left':   break; // they left the room
      case 'tutorio:ended':  break; // the host ended the session
      case 'tutorio:error':  break; // e.data.code says why; render the page again for a fresh link
    }
  });
</script>
来自 iframe 的消息
tutorio:ready房间已加载并正在显示其“加入”屏幕。
tutorio:joined他们已进入房间。role 为 host 或 participant。
tutorio:left他们已离开,或者被主持人移出了房间。
tutorio:ended主持人已为所有人结束了会话。
tutorio:erroriframe 无法显示房间。code 说明了原因:link_expired、no_session、locked、own_account、embed_off、permissions。
  • 在 iframe 中可用的功能白板、标签页、应用与网页、上传、聊天、带有摄像头和屏幕共享的通话,以及主持人的房间控制项。
  • 需要独立标签页的功能录制、Rio、邀请表单、云端文件、Print Studio 以及直播课。房间提供“在新标签页中打开”按钮;fallback_url 与你自己的地址相同。
  • 会话iframe 在打开期间(无操作两小时,最长十二小时)以及重新加载时会保持登录状态。主持链接只能使用一次,因此请在每次渲染页面时生成新链接。从列表中移除网站将登出所有嵌入的房间。
  • 无 Cookie不依赖任何第三方 Cookie。

如果反过来,想把你自己的内容放入看板中,请使用下方的自定义应用 SDK。对于学习平台,LTI 1.3 无需编写代码即可将看板添加到课程中。

自定义应用 SDK

任何支持 iframe 嵌入的 https 网页都可以成为看板上的应用。在“集成”的“自定义应用”下方添加它,加载一个脚本,房间里的所有人即可共享它。

全房间共享的计数器
<button id="add">0</button>

<script src="https://tutorio.app/public/assets/js/sdk/board.js"></script>
<script>
  const button = document.getElementById('add');
  const show = (state) => { button.textContent = state.count || 0; };

  TutorioBoard.ready().then((room) => {
    show(room.state);
    TutorioBoard.on('state', show);
    button.onclick = () => {
      TutorioBoard.state.set('count', (TutorioBoard.state.get('count') || 0) + 1);
    };
  });
</script>
TutorioBoard
ready()房间承诺:不在白板页面时提供 me、people、state 和 standalone。
state.set(key, value)设置共享值。所有人同步获取;最后写入的键生效。共计 32 KB。
state.get(key)读取共享值。
on('state', fn)当状态发生改变时,返回完整状态。
send(data)向房间内其他人发送消息。不作保留。
on('message', fn)当收到某人发送的消息时触发。
people获取当前房间内的所有成员。

Zapier

Zapier 应用为不懂代码的用户封装了此 API。由于正在等待 Zapier 的审核,它尚未在应用列表中;请向我们索取邀请链接。需要您自备 Zapier 账户。

  • 触发器 课程开始、参与者加入、课程结束、录制就绪、录制转写完成、白板创建。
  • 操作 创建白板、创建加入链接、查找白板。

了解更多关于 Zapier 应用的信息

遇到问题?随时联系我们。

真人客服随时在 support@tutorio.app 回复。告诉我们您正在开发的构想。