The Integration Menu

Choose the path that works best for you. All options are powered by the same secure and reliable verification engine.


Option 1: The Redirect Flow

Best for: The fastest, lowest-effort integration for any business.

This standard OAuth 2.0 pattern redirects the user to our secure, hosted verification page. We handle the entire process and send the user back to your site with a one-time authorization code, which you exchange for a confirmation token.

// 1. Redirect user to Surely
const authUrl = 'https://verify.surelyhub.com/auth?client_id=...';
window.location.href = authUrl;

// 2. Handle the callback on your server
app.get('/callback', async (req, res) => {
  const { code } = req.query;
  const token = await surely.exchangeCodeForToken(code);
  // Log the user in
});

Option 2: The Embedded SDK Flow

Best for: Brands who want a seamless UX without the user ever leaving the site.

Our JavaScript SDK renders the verification experience in a secure pop-up or iframe on your page. It handles all communication and returns a secure JWT to your application upon success, which you can then validate on your backend.

<!-- In your HTML -->
<div id="surely-container"></div>
<script src="https://sdk.surelyhub.app/v1/surely.js"></script>
<script>
  const surely = SurelySDK('YOUR_PUBLIC_KEY');
  surely.mount('#surely-container', {
    onSuccess: (token) => {
      // Send token to your backend for validation
    }
  });
</script>

Option 3: The Direct API Integration

Best for: Enterprises with dedicated teams who need maximum control over the UI.

Use our core verification API to build a completely custom front-end. You manage the UI, QR code display, and polling logic, while our API provides the secure endpoint to receive and validate the final Verifiable Presentation.

// Your backend endpoint to receive the proof
app.post('/verify-proof', async (req, res) => {
  const { verifiablePresentation } = req.body;
  
  try {
    const { isValid } = await surely.verify(verifiablePresentation);
    // ... handle success or failure
  } catch (error) {
    // ... handle errors
  }
});
Explore Full API Reference