Skip to main content

Authentication

API Token

Use API tokens for management operations from your backend.

Create a token: Dashboard → Account → API Keys → Create Key

Use in requests:

Authorization: Bearer cf_api_live_abc123...

Example requests

curl https://api.consentforge.com/api/v1/properties \
-H "Authorization: Bearer cf_api_live_YOUR_TOKEN"

Embed Token

The embed token is your property's public identifier. It's used in the <script> tag and is safe to expose publicly — it only allows read-only runtime operations.

<script
src="https://cdn.consentforge.com/consentforge.min.js"
data-token="cf_live_PUBLIC_TOKEN"
></script>

Token scopes

When creating an API key, select the minimum scopes needed:

ScopeAccess
properties:readList and view properties
properties:writeCreate and update properties
policies:readView policies
policies:writeCreate, publish, rollback policies
receipts:readView consent receipts
receipts:exportExport receipts
webhooks:readView webhook config
webhooks:writeCreate and update webhooks
users:readList users
users:writeInvite and manage users
adminFull access (use sparingly)