Documentation menu

Reference

API keys

Which key to use where: secret keys for your server, publishable keys for your app.

Which key to use

KeyStarts withUse it inCan
Publishablepk_live_ / pk_test_Your appActivate, validate, deactivate, and request offline leases.
Secretsk_live_ / sk_test_Your server onlyManage products, policies, licenses, and webhooks.

Send either one as a bearer token:

bash
curl https://api.atlasinfra.cloud/v1/products \
  -H "Authorization: Bearer sk_live_..."

Keys only work in their own environment: a _test_ key sees test licenses only.

Publishable keys

Each product has one publishable key per environment, shown on the product page. They're designed to be public: on their own they can only check licenses, and the customer's license key is still required.

Secret keys

Admins and owners create secret keys in API keys. The key is shown once, so store it in your server's secret manager. Never put a secret key in your app or in source control.

Give each key only the access it needs:

ScopeAllows
products:readView products and policies.
products:writeCreate, edit, and archive products and policies.
licenses:readView licenses, customers, activations, and license history.
licenses:writeIssue, edit, suspend, renew, and revoke licenses; deactivate devices.
webhooks:readView webhook endpoints and deliveries.
webhooks:writeCreate, edit, rotate, and delete webhook endpoints.

You can also give a key an expiry date. If a key leaks, revoke it from the API keys page and it stops working immediately.