This page matches SDK 2.0.0. Auth: Auth & License. Makeup / reshape enums: Parameter enums.
Requirements
- Browser: Chrome 57+, Firefox 52+, Safari 11+, Edge 16+
- Language: JavaScript (ES6+) or TypeScript
- Context: HTTPS or
localhost(required for camera)
Install SDK
Get the example
Clone the GitHub repository and opendemo/web/react:
file: during development.
Bind domain and get credentials
- In the Dashboard, bind your Web domain (for example
example.com). See Subscription. - Copy
appId/appKeyfrom the Dashboard. Do not put them onEngineConfig. On Web they belong on your server.
.lic. Details: Auth & License.
Configure the demo
The demo does not put keys in the page. The page calls your proxy at/api/facebetter/auth (src/fetchLicenseToken.js) and passes the response into the engine. The production proxy lives in api/facebetter/auth.js; during local vite that path is forwarded to the deployed demo proxy.
init(). You do not need to copy resource.fbd into public/. Optional: init({ onProgress }) reports download percent. 3D stickers need resource_3d.fbd; body reshape needs resource_body.fbd — see Optional resource packs.
Run
http://localhost:5175).
Verify
- Open DevTools (F12) and watch the console.
- Allow camera if prompted.
- Drag beauty sliders — you should see skin smoothing / reshape on the preview.
Minimal production init
app_id / app_key and returns a token. Example server code is on Auth & License.
