Skip to content

Authentication

Send your API key as a Bearer token:

Terminal window
curl https://api.afterlib.com/v1/account \
-H "Authorization: Bearer al_live_replace_me"

Live keys begin with al_live_. Treat them like passwords.

Do not send keys in query strings. Query strings are commonly logged by proxies, browsers, and support tools.

Scopes limit what a key can do:

  • account:read is required for GET /v1/account.
  • credits:read is required for GET /v1/credits.
  • ads:read is required for ad search, ad fetch, and collection ad reads.
  • pages:read is required for page search, page fetch, and collection page reads.
  • collections:read is required to list collections and read collection items.
  • collections:write is required to add an item to a collection.

Collection item reads require both collection access and the matching item scope. For example, reading ads from a collection requires collections:read and ads:read.

Revoke keys from the Developer Portal. Revoked keys stop working immediately.