참가자가 이미 로그인된 상태로 화이트보드에 바로 입장할 수 있는 링크를 생성합니다. 자체 '참가하기' 버튼 뒤에 연결하여 사용하세요. 참가자 링크는 만료될 때까지 유효하며, external_id를 전달하면 해당 사용자는 항상 동일한 Tutorio 계정으로 접속합니다. 호스트 링크는 보드의 튜터 권한으로 로그인하며 한 번만 사용할 수 있고 10분간 유지되므로, 사용자가 클릭하는 순간에 생성해야 합니다.
경로
codestringrequired
보드 코드: 링크의 마지막 부분입니다.
본문 (JSON)
role문자열
"participant" (기본값) 또는 "host".
name문자열
화이트보드 화면에 표시될 이름입니다. 참가자의 경우 필수입니다.
external_id문자열
해당 사용자를 식별하기 위한 내 조직의 ID로, 단일 계정을 유지하는 데 사용됩니다.
email문자열
보유하고 있는 경우 입력하는 이메일 주소입니다. 내부 기록용으로만 저장됩니다.
expires_ininteger
링크가 만료될 때까지의 시간(초)입니다. 참가자 링크는 기본적으로 하루 동안 유지되며 최대 90일까지 설정할 수 있고, 호스트 링크는 10분, 최대 1시간까지 유지됩니다.
embedboolean
true로 설정하면 내 페이지의 iframe에 삽입용 링크를 생성합니다. url은 프레임의 src가 되며, fallback_url은 독립된 페이지로서의 보드가 됩니다. 보드의 튜터가 통합(Integrations) 설정에서 귀하의 사이트를 허용해야 하며, 참가자는 external_id가 필요합니다. 임베드 링크는 해당 방에만 로그인되며 프레임 내부에서만 작동합니다. '임베딩' 섹션을 참조하세요.
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)
urlstringrequired
이벤트를 전송할 엔드포인트 URL입니다. 반드시 https여야 합니다.
eventsarray
원하는 이벤트 유형입니다. 비워두면 전체가 선택됩니다.
include_namesboolean
true로 설정하면 참가자 이름, 녹화에 포함된 사람들의 이름, 녹화 요약이 전달됩니다. 생략하거나 false로 설정하면 ID, 역할, 시간 정보만 전달됩니다. 방에 있는 대부분의 사람이 아동이므로, 꼭 필요한 경우에만 이름을 요청하세요.
통합 설정 또는 POST /webhooks을 통해 URL을 추가하면 Tutorio가 각 이벤트를 JSON 형식으로 게시합니다. 15초 이내에 2xx 응답을 반환해야 합니다. 그렇지 않으면 5초 후, 그리고 30초 후에 재시도합니다. 모든 시도 내역은 전달 로그에 일주일 동안 보관되며, "테스트 전송"을 누르면 ping가 게시됩니다.
모든 본문은 동일한 봉투 구조를 가집니다: id, type, created (Unix 시간(초)), 그리고 data.
별도로 요청하지 않는 한 참가자의 이름은 생략됩니다. 각 참가자에게는 id, 지정한 external_id, role 및 시간 정보가 포함되며, 이는 아래 예시와 같습니다. include_names를 사용하여 웹훅을 만들거나(또는 통합 설정에서 "이름 포함" 활성화) 각 참가자의 name 및 녹화의 people 목록을 확인하세요.
session.started첫 번째 참가자가 보드에 입장했습니다.session.started
모든 전송에는 Tutorio-Signature 헤더(t=<unix>,v1=<hex>)가 포함됩니다. 16진수 값은 웹훅 비밀 키(생성 시 한 번만 표시되며 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));
}
verify.py
import hashlib, hmac, time
# raw_body is the request body as bytes, exactly as received.
def verify(secret: str, header: str, raw_body: bytes) -> bool:
parts = dict(p.strip().split("=", 1) for p in header.split(","))
signed = parts["t"].encode() + b"." + raw_body
want = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
fresh = abs(time.time() - int(parts["t"])) < 300
return fresh and hmac.compare_digest(want, parts.get("v1", ""))
로그인 링크
로그인 링크를 사용하면 사용자가 이름이 이미 지정된 상태로 바로 화이트보드에 입장할 수 있습니다. 사용자가 참여하기 버튼을 누른 순간 서버에서 생성하여 해당 링크로 리디렉션하세요.
참여자 링크는 만료될 때까지 유효합니다. 기본값은 1일이며, 최대 90일까지 설정할 수 있습니다.
호스트 링크는 보드의 튜터 권한으로 로그인합니다. 1회용이며 10분 동안 유지됩니다.
external_id를 사용하면 사용자가 다시 방문할 때마다 동일한 Tutorio 계정을 유지할 수 있습니다.
join.js
// When someone presses Join in your product:
app.get('/lessons/:id/join', async (req, res) => {
const lesson = await db.lessons.find(req.params.id);
const user = req.user;
// The same external_id always returns the same board.
const board = await tutorio('POST', '/boards', {
name: lesson.title,
external_id: 'lesson-' + lesson.id,
});
const link = await tutorio('POST', '/boards/' + board.code + '/links', {
role: user.isTutor ? 'host' : 'participant',
name: user.name,
external_id: 'user-' + user.id,
});
res.redirect(link.url);
});
임베드
가장 간단한 방법은 제품 내 어디에나 참여 버튼을 배치하는 것입니다. 화이트보드가 독립된 페이지로 열리며, 현재 탭이나 새 탭에서 실행할 수 있습니다.
참여 버튼
<!-- 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만 지원되며 와일드카드는 사용할 수 없고 최대 10개의 사이트까지 등록할 수 있습니다. 그 외의 사이트나 다른 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.
카메라 권한 전달하기. 브라우저 내에서 카메라, 마이크, 화면 공유가 정상적으로 작동하려면 아래의 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>
프레임에서 온 메시지
tutorio:ready
룸이 로드되었으며 참여 화면이 표시되고 있습니다.
tutorio:joined
사용자가 룸에 입장했습니다. role 값은 host 또는 participant입니다.
tutorio:left
사용자가 퇴장했거나 호스트가 내보냈습니다.
tutorio:ended
호스트가 모든 사용자에 대해 세션을 종료했습니다.
tutorio:error
프레임에 룸을 표시할 수 없습니다. 원인은 code에 표시됩니다: link_expired, no_session, locked, own_account, embed_off, permissions.
프레임 내에서 작동하는 기능 보드, 탭, 앱 및 웹사이트, 업로드, 채팅, 카메라 및 화면 공유가 포함된 통화, 호스트의 방 제어 기능이 작동합니다.
별도의 탭이 필요한 기능 녹화, Rio, 초대장, 클라우드 파일, Print Studio 및 라이브 수업입니다. 화이트보드에는 새 탭에서 열기 버튼이 있으며, fallback_url은 귀하의 서비스에서 사용할 수 있는 동일한 주소입니다.
세션 프레임은 열려 있는 동안(비활동 시 2시간, 최대 12시간) 그리고 새로고침 후에도 로그인 상태가 유지됩니다. 호스트 링크는 1회용이므로 페이지를 렌더링할 때마다 새 링크를 만들어야 합니다. 목록에서 사이트를 제거하면 임베드된 모든 방에서 로그아웃됩니다.
쿠키 미사용 서드파티 쿠키에 의존하는 기능이 전혀 없습니다.
반대로 여러분의 콘텐츠를 보드에 넣으려면 아래의 커스텀 앱 SDK를 사용하세요. 학습 플랫폼의 경우 LTI 1.3을 통해 코드 작성 없이 코스에 보드를 추가할 수 있습니다.
Custom Apps SDK
프레이밍을 허용하는 HTTPS 페이지라면 어떤 것이든 화이트보드의 앱으로 사용할 수 있습니다. 통합 설정의 커스텀 앱에서 추가하고 스크립트 하나만 로드하면 룸 안의 모든 사용자가 공유할 수 있습니다.