Skip to main content

Hub Integrator Setup

This guide covers connecting your domain or organization to NEUS, issuing sponsored verifications, and configuring hosted checkout.

Prerequisites

  • A NEUS account with a verified wallet
  • Your integration domain or organization OAuth credentials
  • If using hosted auth code exchange, a NEUS-issued partner credential

1. Domain Verification

Link your domain to your wallet by setting a DNS TXT record. Step 1: Add a DNS TXT record at _neus.<yourdomain.com>:
neus=<your-wallet-address>
Step 2: Create a domain proof:
const proof = await client.verify({
  verifier: 'ownership-dns-txt',
  data: {
    domain: 'yourdomain.com',
    walletAddress: '0x...',
  },
  walletAddress: '0x...',
  signature: '0x...',
  signedTimestamp: Date.now(),
});
Step 3: Confirm the proof is active:
GET /api/v1/proofs/check?verifierIds=ownership-dns-txt&address=0x...

2. Organization OAuth Setup

For organization-level verifications (ownership-org-oauth):
  1. Register the provider credentials for your NEUS deployment
  2. Add https://api.neus.network/api/v1/auth/oauth/callback/<provider> to allowed redirect URIs
  3. Validate provider credentials and redirect URIs before going live

3. App Linking and Attribution

To track usage per integration:
  1. Create or obtain an appId for your integration
  2. Treat appId as a public attribution identifier, not a secret
  3. Include X-Neus-App: <appId> on all API requests
const client = new NeusClient({ appId: 'your-app-id' });

4. Hosted Checkout for Interactive Verifiers

Interactive verifiers (ownership-social, ownership-org-oauth, proof-of-human) require NEUS-hosted flow.

React (VerifyGate)

import { VerifyGate } from '@neus/sdk/widgets';

<VerifyGate
  apiUrl="https://api.neus.network"
  hostedCheckoutUrl="https://neus.network/verify"
  requiredVerifiers={['ownership-social']}
  onVerified={(result) => console.log('Verified:', result.proofId)}
>
  <ProtectedContent />
</VerifyGate>

Session-first (lowest friction)

Redirect users to https://neus.network/verify?intent=login&returnUrl=<your-url>:
curl -X POST https://api.neus.network/api/v1/auth/code/exchange \
  -H "Authorization: Bearer <partner-credential>" \
  -H "Content-Type: application/json" \
  -d '{ "code": "<auth-code>" }'
This is a constrained partner flow requiring NEUS-issued partner credentials.

5. Sponsor Grants (Covering Verification Costs)

If your integration sponsors verification costs:
const client = new NeusClient({
  appId: 'your-app-id',
  sponsorGrant: '<sponsor-grant-token>',
});
Sponsor grant tokens are short-lived. Re-issue them per session. Do not embed long-lived API keys in client-side code.

6. Usage and Analytics

Track usage with your appId and NEUS partner reporting:
  • Proof creation volume per verifier
  • Gate check counts by app
  • Sponsor grant consumption
The /api/v1/proofs/check response includes matchCount for your telemetry.

Operational rules

  • Keep /verify as the single hosted path for interactive verification and login.
  • Treat appId as public attribution only; do not use it as a secret.
  • Keep sponsor grants and partner credentials server-issued and short-lived.