Requires Node.js 22+ (the Vana SDK’s minimum).
http://localhost:3000 and click Connect Spotify. The approval tab returns locally, the original tab polls status, and the app reads sample data through the same createAccessRequest, getAccessRequestStatus, and readApprovedData controller methods used in live mode.
If port 3000 is taken, Next.js starts on the next free port (for example
http://localhost:3001). Open the port it prints, and set VANA_APP_URL to that same origin so the approval return URL matches.examples/vana-app/lib/vana.ts:
- Source and app
id/nameare constants inlib/vana.ts— edit them there. - Scopes can be set either in
lib/vana.tsor with theVANA_SCOPESenv var (comma-separated, for exampleVANA_SCOPES=spotify.savedTracks,spotify.profile). - Sample fixture URL is set with
VANA_SAMPLE_DATA_URL(orVANA_SAMPLE_DATA_PATHfor a local file).
vana-com/data-connectors.
Test against the live protocol
Copy the example env file:VANA_MODE=live (from sample), VANA_APP_PRIVATE_KEY, VANA_APP_URL, VANA_ENV=production, and VANA_NETWORK=moksha (testnet) or mainnet. Keep the private key server-side.
You don’t set the escrow contract address — the SDK resolves it from the network you choose (
VANA_NETWORK), along with the escrow gateway. Just fund escrow for your app on that network so paid reads can settle. VANA_ESCROW_CONTRACT, VANA_DP_RPC_URL, VANA_ACCESS_REQUEST_BASE_URL, and VANA_APPROVAL_APP_BASE_URL exist only as optional overrides for custom deployments — leave them unset to use the network defaults.Prefer to build the integration directly into your own app? See Add Vana to your own app.