Embedding Dislab in your app
ProShow the whole console, or just screens, media, playlists, signs or menus, in an iframe on your own pages.
A partner app connected with the embed scope (see Connect Dislab) can show Dislab on its own pages. It looks and works like Dislab, signed in as the owner, with no cookies. The owner’s account must be on Pro.
- Tell us which websites will show it (scheme and host, such as
https://app.yourapp.example). Dislab only appears on those. - For each page view, your server asks for a session with the owner’s access token:
curl -X POST https://dqeiiqecdxqguwrilond.supabase.co/functions/v1/api/v1/embed/sessions \ -H "Authorization: Bearer dla_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{"origin": "https://app.yourapp.example", "module": "screens"}'moduleisall,screens,media,playlists,signsormenus. - Put the
urlfrom the answer in an iframe. The session lasts an hour (expires_at); ask for a new one on each page load.<iframe src="URL_FROM_THE_ANSWER" style="width:100%;border:0"></iframe>
Messages
Dislab posts messages to your page only (never to another website), each with source: "dislab":
{type: "ready", module}: it has loaded.{type: "navigated", path}: the owner moved to another page.{type: "resize", height}: set the iframe to this height to avoid a scroll bar inside it.
Send {type: "dislab:navigate", path: "/media"} to the iframe to open a page within its module.
Inside your app, billing, API keys, webhooks, connected apps, phone alerts, people, downloading everything and deleting the account stay in Dislab itself. Opened directly, or on a website not approved, the iframe shows nothing. When the owner disconnects your app, sessions stop at once.
Thanks for telling us. If something’s missing, tell us what and we’ll add it.
Still stuck?
Email support@dislab.app, or send us a message. If it’s about a screen, tell us its name. We answer within one business day.