Provision a Producer
Provision a Producer
Producer provisioning creates a least-privilege OAuth client and returns a flat credential bundle that the SDK can use.
Prerequisites: a broker credential with producers.provision, authority over
the requested tenant/owned data space, and your supplied API URL. Event-writing
authority alone is insufficient. Human credential controls are under
Admin → Credentials; data-space reservations/claims are under Producers.
ADMIN_URL="$API_URL"
TOKEN="$BROKER_PROVISION_TOKEN"
curl -sf -X POST "$ADMIN_URL/api/v1/producer-provisioning" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"companySlug": "acme",
"producerSlug": "web-app",
"displayName": "Acme web app",
"environment": "production",
"scopeTemplate": "events"
}'
The clientSecret is returned only on create and rotate. Store it immediately.
Pass the returned flat bundle, including base URL, token URL and audience, to
the released SDK's provisioned-producer constructor. Send one valid event and
verify its response before considering the handoff complete.
Example: replace acme with your authorized tenant and provision web-app for
server-side event writes. The events template grants writing only. On conflict,
inspect the existing producer; rotate only when a new secret is needed. List and
inspect cannot recover a lost secret. Wrong-tenant and absent identifiers both
return not found.