Authentication
API keys, rotation, scopes, and secret handling.
LinkFetch uses bearer-token authentication. Every request carries your key in
the Authorization header. Keys are scoped to a single workspace; rotate them
freely — old keys keep working for a 24-hour grace window.
Where to get a key
Sign in at linkfetch.io/signin → the dashboard shows your default key. Create additional keys for CI, production, and local dev on the keys page.
Send it on every request
curl https://api.linkfetch.io/v1/profiles \
-H "Authorization: Bearer sk_live_..." \
--data-urlencode "url=linkedin.com/in/ada-lovelace"import { LinkFetch } from "@linkfetch/sdk";
const ll = new LinkFetch({
apiKey: process.env.LINKFETCH_KEY!,
});from linkfetch import LinkFetch
ll = LinkFetch(api_key=os.environ["LINKFETCH_KEY"])Key shape
Keys are prefixed sk_live_ for production and sk_test_ for sandbox. The
prefix is returned in the X-Api-Key-Prefix header on every response so you
can double-check routing in logs.
sk_live_…— 24-hour grace on rotationsk_test_…— hits a sandboxed router; no credits charged, fixture data
Rotating keys
- Create a new key in the dashboard.
- Deploy it to your service.
- Revoke the old key. For 24 hours, both keys work.
- After 24 hours, the revoked key returns
401 invalid_key.
Secret handling
- Never commit a key. LinkFetch hashes keys on ingest and we can't recover the plaintext if you lose it — only the prefix is shown after creation.
- Store keys in a secrets manager (Doppler, AWS Secrets Manager, Vercel env vars, GitHub Actions secrets).
- Rotate on any compromise. The dashboard has a one-click revoke.
- For CI and server-to-server, use a dedicated key labelled
ciorserverso you can revoke without disrupting dev.
Scopes (coming soon)
Enterprise customers can scope keys to specific endpoints (read-only, no outreach queue, etc.). Ask your account owner or email info@linkfetch.io.
Common errors
| Code | When |
|---|---|
401 invalid_key | Key is wrong, revoked, or past the grace window. |
401 missing_key | No Authorization header on the request. |
403 scope_denied | Key is scoped and the endpoint is out of scope. |
429 rate_limit | Too many requests — see Rate limits. |
See Errors for the full envelope.