ExodeMiniApp is the main client class. Use one instance per app. All methods are typed and return a Promise.
Creating an instance
Configuration parameters
string
required
The mini app identifier, passed to the host during the handshake. For custom pages,
you can choose any value; it is not registered anywhere: the host trusts the app based on the origin of the address in the
App URL (iframe) field.
string
The origin of the school page the app is opened in, for example
https://my-school.exode.biz or your
school’s own domain. The SDK sends messages only to this origin and accepts responses only from it.
Defaults to * (any origin); in this case the SDK writes a warning to the console. In production, specify
the origin explicitly.number
Timeout for the handshake and all commands (ms). Defaults to
10000.Initialization
MiniAppContext. Calling init() again throws an error.
If the page is opened without signing in (the Available without login option), the handshake still succeeds, but ctx.user.id
is 0 and the personal fields are empty, so check ctx.user.id > 0 before showing user data.
If the handshake does not complete within
timeout ms, the Promise is rejected. Make sure the iframe is opened inside Exode and targetOrigin is correct.Navigation (app.route)
path is a platform route template (not a ready-made URL); values are substituted from params:
pageId). The host’s current route arrives in the same format in the route:changed event.
When the app is hidden (the user went to another page or minimized the window), the host ignores the
navigate, navigate:back and setTabbarVisible commands.UI commands (app.ui)
minimize() works only for pages with the Floating window, Side panel or Fullscreen window type
(see Custom pages). A minimized window is not unloaded:
the app receives the visibility:changed event with visible: false and keeps running.On the school’s custom pages, the host currently does not handle the setHeaderVisible command, and it has no effect.A command’s Promise resolves when the host confirms receipt. The host also confirms commands that
do nothing in the current context, so a resolved Promise does not guarantee a visible effect.
Events (app.on)
Subscribe to host events. Returns an unsubscribe function.Getting the current context
init() returns the context once. For later access, use getContext(): it returns the
context from the handshake, to which the bridge applies only context:updated events.
Shutting down
postMessage listeners and clears event handlers. Call it when the app unmounts.
Full example
Updated: 2026-09-28 05:04 UTC