Skip to main content
Edpire’s REST API and embed token system are designed to work with any platform, including mobile apps that cannot run the JavaScript SDK directly.

How it works

Mobile integration follows a two-part architecture: Your API key never leaves your server. The mobile app only ever sees a short-lived embed token.

The WebView HTML template

This is the universal mobile player. Load it in any WebView with the embed token injected:
Serve this HTML from your own backend (or build it as a string in your app) with {{EMBED_TOKEN}} replaced server-side.
Never embed your API key in the WebView HTML. The embed token is short-lived (2 hours), consumed on submit, and scoped to a single learner and assessment — it is safe to put in client code.

React Native

React Native apps can use EdpireClient directly for server-side operations — it uses fetch, which is available natively in React Native. For the player, open a WebView with the HTML template. Server-side (your Node.js backend):
React Native app:

Flutter

Flutter apps call your backend via http or dio to fetch the embed token, then load the player HTML in a WebView. Mint the token from your backend (Dart HTTP call):
Load the player in a WebView (using flutter_inappwebview):

Native iOS / Android

The same HTML template works in any native WebView:
  • iOS: WKWebView — use loadHTMLString(_:baseURL:) and receive messages via WKScriptMessageHandler
  • Android: WebView — use loadDataWithBaseURL() and receive messages via addJavascriptInterface
The pattern is identical in both cases: your backend mints the token, the native code builds the HTML string with the token injected, and the result comes back via the WebView message bridge.

Platform comparison

Ionic and Capacitor apps run in a WebView already. You can use the full @edpire/sdk npm package directly — no need for the HTML template approach.