Implementation
1. Open a sandbox account
Sign up for a SeedLink Dashboard account with just your email. Every account starts in sandbox — free, pre-seeded with test data, no real Metrc or BioTrack credentials required to start building.
2. Get your API credentials
Generate a client_id and client_secret in the SeedLink Dashboard's API Keys page. Exchange them for a Bearer token:
Code
A few things to know about the token you get back:
- Send it as
Authorization: Bearer <access_token>on every call. - It expires after an hour.
- You also get a
refresh_token. Use it to get a new access token without re-sending yourclient_secret. - Most integrations handle refreshing once, in a thin wrapper around outgoing requests. It's not something you think about per call.
3. Embed the Connect SDK
Create a link token on your server, using the Bearer token from step 2:
Code
Pass that link token to the SDK on the client to display the widget:
Code
Linking Metrc and BioTrack accounts
The widget walks your user through picking their state system and entering their login. Their credentials go straight to SeedLink, never through your app. On success, you get a public_token. Exchange it server-side for a connection_id:
Code
Store the connection_id. It's how you'll reference this user's linked account going forward.
4. Make API calls
Every request needs your Bearer token and a connection_id together:
Code
Every response comes back in the same envelope:
Code
5. Going live
Everything above runs in sandbox by default: free, pre-seeded, no real credentials required. Moving to production is a plan switch, not a code change. Reach out to core@seedlink.dev when you're ready to go live.