Vouch logovouch
Examples

Social & Audience Verification

This guide shows you how to implement following verification, one of the Social & Audience verification types available in vouch. See all verification types →

Implementation Example: Following Verification

Following verification is critical for brand partnerships. vouch enables your business to verify social followership by allowing users to prove who they follow through authenticated access to their X (Twitter), Instagram, LinkedIn and other social accounts.

This example demonstrates how users can prove their following relationship through authenticated access to their X account, with cryptographic proof that defeats screenshot and AI-generated fraud.

See It in Action

Watch how following verification works with X. Users prove they follow specific accounts through authenticated access to their X account:

Step 1: Select Data Source

For this Social & Audience Verification example, we'll use "X - Following" as our data source. This data source allows users to verify following relationships by proving access to their X account. X stores verified following information that vouch can cryptographically confirm.

See all Social & Audience data sources →

Step 2: Redirect Users to vouch

To trigger the following verification process, redirect the user to vouch:

import { Vouch } from '@getvouch/sdk';

const vouch = new Vouch({
  customerId: "1be03be8-5014-413c-835a-feddf4020da2",   // Your unique customer ID
  apiKey: "your-api-key",                                // Your API key
});

const { verificationUrl, requestId } = await vouch.getDataSourceUrl({
  datasourceId: "12ea08f3-ae24-4bce-bf2c-6f59459b40b2", // X - Following data source
  inputs: { twitter_username: "zkmarek" }, // inputs (optional, depending on data source), when no inputs use {}  
  redirectBackUrl: "https://docs.getvouch.io/examples/social_and_audience", // Return destination
  webhookUrl: "https://docs.getvouch.io/api/web-proof", // Verification delivery endpoint (optional)
});

// Redirect the user to vouch
window.location.href = verificationUrl;

This opens vouch in a new tab where users authenticate with their X account to verify their following relationship. After verification, they're redirected back to your application with the verified data.

Step 3: Receive Verification Data

When following verification is complete, vouch sends a POST request to the webhookUrl you specified in Step 2:

{  "requestId": "...",  "outputs": {    "Followee": "zkMarek",    "Is following": true  },  "webProofs": [...]}

Payload structure:

  • requestId: The unique ID of the verification request
  • outputs: Verified following data extracted from the user's X account
  • webProofs: Array of cryptographic verifications, each containing:
    • outputs: Data extracted from this specific verification
    • presentationJson: The cryptographic proof object used for verification
    • decodedTranscript: Human-readable HTTP request/response data

Note: The webProofs array will be absent when the data source contains sensitive data. Only the extracted outputs are retained in that case.

Verifying Cryptographic Proofs (Optional): To confirm the verification data hasn't been tampered with, extract presentationJson from webProofs and pass it to vouch's verification endpoint. Learn how to verify webproofs →

Step 4: Test the Flow

Test the complete following verification flow using the interactive demo below. This demonstrates the exact experience your users will have:

Prerequisite

To run the Desktop verification flow, install the vlayer extension.

Available Data Sources

Next Steps

Ready to get started? Check out our Getting Started guide to learn how to integrate vouch into your application.