Prototype. This is the developer flow we are building. Nothing here is live yet.
Quickstart
Test modeGo live

Three files. Your key is already in them.

Source is set to Strava for the walkthrough. Change source and scopes to any of the 64 sources.

$ npm install @opendatalabs/connect-js
.env.local
ODL_API_BASE_URL=https://api.opendatalabs.com/api/v1
ODL_API_KEY=uu_test_sk_4Kq9mZ2vP8xL1nR7wB3cT6yH0jF5dG   ← your key, already filled
ODL_APP_ID=odl_app_8f2k1
APP_URL=http://localhost:3000
NEXT_PUBLIC_VANA_CONNECT_OPENING_URL=https://app.vana.org/connect/opening
lib/odl.ts
import { createConnectController } from "@opendatalabs/connect-js/server";

export const odl = createConnectController({
  apiBaseUrl: process.env.ODL_API_BASE_URL!,
  apiKey: process.env.ODL_API_KEY!,
  appId: process.env.ODL_APP_ID!,
  defaultOrigin: process.env.APP_URL!,
  source: "strava",
  scopes: ["read:activities"],
});
app/connect-button.tsx
const connect = useTwoTabConnect({ openingUrl, createSession, getStatus, readResult });
<button onClick={() => connect.start()}>Connect data</button>
Or skip the code for now

Try the hosted Connect flow as your own user, right here. It uses the same session your server would create.

Try the Connect flow
Waiting for your first session
Listening on odl_app_8f2k1
// POST /api/v1/connect/sessions
// nothing yet

This panel updates the moment your server creates a session.

Checklist
Get a test key
Run the quickstart
Connect a source as your own user
Step 4 of 7