Docs
العربية Get your keys

API keys

Every store has two keys. One is public and goes in your pages. The other is secret and stays on your server.

On this page

The two keys#

Find both on the API keys page of the dashboard.

Publishable keySecret key
Starts withpk_bf_
Used byThe browser SDKThe server API
Goes inYour pages, as data-keyYour server, as X-API-Key
Visible to visitorsYes, and that is safeNever
Where each key goes
# in the page: public
data-key="pk_xxxxx"

# on your server only: .env
ANTIRO_SECRET_KEY=bf_xxxxx

Allowed domains#

The publishable key works on your store’s domain and its subdomains. The API keys page shows the allowed domains of each store.

From any other domain, Antiro refuses the script’s requests. The page keeps working, but it is not protected.

Replace a key#

Secret key. It is shown once, when it is created. Creating a new one is the only way to see a secret key again, and the old key stops working within a minute, so update your server right away.

Publishable key. Creating a new one replaces the old one, so update data-key in your pages.

Search by topic, field name or status code.