Skip to main content

Requirements

Node.js

≥ 18.0.0

TypeScript

≥ 5.7 (optional, types included)

React

≥ 17 (only for miniapp/react)

Installing via npm

React is an optional peer dependency. If your project doesn’t use React, the miniapp/react module won’t pull it in and won’t end up in the bundle.

Imports

The package has four subpath exports — import only the one you need:
@exode-team/sdk/api and @exode-team/sdk/miniapp/server are for the server only: the first works with the school’s API token, the second with the page secret and uses the Node.js crypto module. Do not import them into the client bundle.
Do not import from the root (@exode-team/sdk) — the root export is not defined, to avoid accidentally loading server and client code in the same bundle.

Using a CDN

For static pages without a build step, an IIFE bundle of the MiniApp module (ExodeMiniApp, retrieveInitData) is available. React hooks and server functions are not shipped via the CDN.
Once loaded, the global ExodeMiniAppSDK object becomes available:
In production, always pin the version (v0.3.0, v0.3.1, etc.). The latest tag updates automatically and may introduce breaking changes. retrieveInitData is available in the CDN bundle starting from v0.3.1. Version numbers on the CDN may lag behind npm — if the version you need is not on the CDN, install via npm.

TypeScript

Types ship with the package; no additional @types/... package is required.

Updated: 2026-09-25 14:33 UTC