Migration
This guide walks you through upgrading from the deprecated v1 SDK to v2.
1. Installation
Refer to the full install instructions:
New SDK v2: Installation
Deprecated v1: Deprecated Installation
npm
npm install @smileid/web-components@<version>import "@smileid/web-components/smart-camera-web";Script tag
Pin to v2.0.0:
<script src="https://cdn.smileidentity.com/js/v2.0.0/smart-camera-web.js"></script>Or auto-update within v2:
<script src="https://cdn.smileidentity.com/js/v2/smart-camera-web.js"></script>2. What’s Changed
Initialization
v1 event listener
imagesComputedis removed.v2 uses
smart-camera-web.publishfor events.
Event Payload
The event detail for
smart-camera-web.publishis still the same asimagesComputed
3. Receiving Callbacks
Listen for the same smart-camera-web.publish event:
4. New features
v2 is fully modular. You can compose your own flow—selfie only, ID document only, or any combination/order you prefer. See usage for more examples
5. Next Steps
Review the v2 Installation
Explore more v2 examples in Usage
Last updated
Was this helpful?

