Keys / Polar
POLAR_ACCESS_TOKEN
The organization access token your server calls the Polar API with to manage products, checkouts, orders and subscriptions.
- Starts with
polar_oat_- Expires
- you choose, or never
- API
- none; dashboard only
Get it
Create one on polar.sh/to/dashboard/settings/access-tokens. The steps aren't recorded yet.
Set it
POLAR_ACCESS_TOKEN=polar_oat_...
The TypeScript SDK reads it when you don't pass accessToken, and the Polar CLI reads it on machines without a browser. The Python SDK doesn't. Or keep it out of .env with keypin: keypin run -- npm run dev
Replace it
- Under Settings > Access Tokens, create a new token with the same scopes as the old one.
- Deploy it everywhere that reads
POLAR_ACCESS_TOKEN. Both tokens work in the meantime. - Check that nothing still uses the old token, then remove it from Access Tokens.
Set rotate_every on the key in keypin.toml and a rotated date on its vault item, and keypin status shows when it's due.