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 (native)
The Dashboard no longer offers self-serve offline.lic downloads. To get an offline license, contact sales or an administrator:
- Email: hello@facebetter.net (subject tip:
[Business Partnership] Offline license) - More options: Contact Us
licenseToken / license_token. Validity matches your current subscription; after renewing or changing the plan, request a new file and replace it in the app.
Notes
- The offline license is bound to the app identifiers configured in the Dashboard; 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, no keypoint callbacks). Renew and request a new license.
- Web cannot use offline licenses; it must complete an online v2 auth path.
Engine events
Listen for license and init results viaonEngineEvent:

