@pryvc/sdk
v1.2.0
Published
PRYVC Share button + certified consent widget — OAuth for contact details. Zero dependencies.
Maintainers
Readme
@pryvc/sdk
The PRYVC embed: the Share with PRYVC button (one-click consented form fill) and the certified consent widget (accountless, tamper-evident consent certificates). Zero dependencies, < 5 KB gzipped.
Most sites should use the CDN channel — updates reach you automatically:
<script
src="https://cdn.pryvc.com/v1/pryvc.js"
data-client-id="pc_your_client_id"
data-fields="first_name,last_name,email"
data-purpose="Quote request"
></script>Via npm (bundled apps):
import '@pryvc/sdk'; // side-effect: exposes window.Pryvc (and boots any declarative script tag)
window.Pryvc.init({
clientId: 'pc_your_client_id',
fields: ['first_name', 'email'],
purpose: 'Quote request',
container: document.querySelector('#slot'),
});- Popups blocked (iOS Safari, in-app webviews)? The SDK falls back to a full-page redirect automatically and resumes on return.
- Scan to share: on a laptop the consent screen offers a QR; the consumer approves on
their phone and your form fills on the laptop. On by default;
data-handoff="off"disables it. The resulting share is identical. - Button styles:
data-style="dark pill lg"— see the gallery at demo.pryvc.com/styles. - Certified consent (Enterprise):
data-mode="consent"— every submission becomes a verifiable certificate.
Full documentation: developers.pryvc.com · Get a client id: portal.pryvc.com
