appId + appKey for online auth. Web must never embed appKey in frontend JavaScript.
Native (Android / iOS / macOS / Windows)
Pass one of the following when creating the engine:
Priority: if
licenseToken is non-empty, the SDK validates that token locally and does not call the network with appId / appKey.
iOS / macOS
.lic as an app asset and loading it at runtime instead of hard-coding it in source. How to obtain one: Offline license below.
Web
The browser SDK has noappId / appKey fields. The engine only accepts licenseToken and verifies it locally. Fetch the token from your server before init().
Recommended flow
- Create an app in the Dashboard, bind your Web domain, and copy
appId/appKey(see Subscription) - Keep the keys on your backend; expose an endpoint (for example
POST /api/facebetter/auth) - Your backend signs a request to
https://facebetter.pixpark.net/facebetter/v2/authand returns the raw response body to the page - Pass that string to
EngineConfig.licenseToken, then callinit()
demo/web/react) uses the same pattern: frontend in src/fetchLicenseToken.js, server proxy in api/facebetter/auth.js.
Frontend
Server proxy (Node example)
StoreFB_APP_ID / FB_APP_KEY in environment variables. Drop this into Express / Fastify / a serverless function:
api/facebetter/auth.js.
Upstream request fields
On success the upstream returns JSON (including a
token field). You may forward the response text as-is, or extract only the token string — the SDK accepts either.
Offline license
Download an offline.lic from the Dashboard credentials page and pass the entire contents as licenseToken / license_token.
Paid plans lock each saved identifier. An empty platform can be filled once. To change a locked identifier, contact support. Free plans can edit identifiers and download anytime.
The file expires 15 days after the subscription ends. Downloading again does not move that date. After renewal, download a new file.
Notes
- Online tokens and offline licenses both check the Dashboard app identifier: iOS and macOS use the Bundle ID, Android uses the package name, Windows and Linux use the executable file name, and a browser uses the page origin. Electron does not check origin. A mismatch fails validation.
- Not expired: features follow your subscription plan.
- Expired: the engine can still initialize, but capabilities fall back to the Free plan (watermarked trial). After renewal, download a new file from the Dashboard.
- Web offline licenses are bound to the page origin. Pass the entire
.licaslicenseToken.
Engine events
Listen for license and init results viaonEngineEvent:

