Iframe Integration
The simplest way to integrate Trusty is embedding an iframe on your page.
Widget URL
https://trusty.sh/verify?public_token=TR_PUB_xxx&lang=en&metadata=...
Parameters
| Parameter | Required | Description |
|---|---|---|
public_token | Yes | Your client token (TR_PUB_xxx) |
lang | No | Widget language: es or en. Default: en |
metadata | No | JSON with data you want passed through to the webhook (e.g. {"userId":"123"}) |
HTML example
<iframe
src="https://trusty.sh/verify?public_token=TR_PUB_xxx&lang=en&metadata=%7B%22userId%22%3A%22123%22%7D"
style="width:100%;max-width:420px;height:640px;border:0"
allow="camera">
</iframe>
Iframe attributes
allow="camera"— required for camera access- Recommended dimensions:
420pxwide x640pxtall - No border (
border:0) for clean integration
Metadata
Metadata travels intact from the iframe to the webhook. You can send any JSON:
{"userId": "123", "session_id": "abc456", "plan": "premium"}
The metadata is saved with the verification and returned in the webhook and the lookup API.
Cross-device (QR)
If the user opens the widget on desktop without a camera, Trusty shows a QR code. The user scans it with their phone and the verification continues there. The desktop view updates automatically every 2 seconds via polling.
No extra work needed — the QR flow is automatic.