# Onboard a facility via Connect SDK

The most common first integration: let a customer link their Metrc or BioTrack facility to your product without ever handling their state-system credentials.

## Create a link token

Your backend calls `POST /v1/link/token/create` with your org's Bearer token. This returns a short-lived, single-use `link_token` scoped to one linking session.

## Open Connect in your frontend

Pass the `link_token` to `SeedlinkConnect.create()`. The SDK opens a SeedLink-hosted iframe where the user picks their state system, picks a state, and enters their credentials. None of it touches your servers.

## Exchange the public token

On success, the SDK's `onSuccess` callback hands you a `public_token`. Send it to your backend, which calls `POST /v1/link/token/exchange` to get back a permanent `connection_id`. Store that on the customer's record. It's how you'll reference their linked account on every future call.

## Read your first resource

With the `connection_id` in hand, call `GET /v1/connections/{connection_id}/facilities` using your org's Bearer token. You now have the customer's licensed facility list, normalized to SeedLink's Common Data Model regardless of whether they're on Metrc or BioTrack.

