Source is set to Strava for the walkthrough. Change source and scopes to any of the 64 sources.
$ npm install @opendatalabs/connect-jsODL_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/openingimport { 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"],
});const connect = useTwoTabConnect({ openingUrl, createSession, getStatus, readResult });
<button onClick={() => connect.start()}>Connect data</button>Try the hosted Connect flow as your own user, right here. It uses the same session your server would create.
Try the Connect flow// POST /api/v1/connect/sessions
// nothing yetThis panel updates the moment your server creates a session.