Testing
Simulating errors
Test auth, origin, rate-limit, validation, and unknown project failures.
Auth failures
Call a secret-key endpoint without auth and with a publishable key. Expect actionable 401 or 403 errors.
Origin mismatch
Use a publishable key from an unlisted origin and confirm the runtime `forbidden` error is visible to the developer.
Rate limits
Generate repeated calls against a test key and confirm 429 includes Retry-After.
Expected negative tests
Intentional sandbox checks for missing asset_token, missing slot_id, invalid event, stale occurred_at, or invalid consent purpose should return actionable 400 validation errors with request IDs and field paths. These are not production integration failures when deliberately triggered.
Stale direct server beacon timestamps can return BEACON_TOO_LATE. Generate occurred_at at runtime with new Date().toISOString() for every beacon event.
Need rollout review?
Start with the Server API. Use contact only when you need rollout review, enterprise coordination, or non-standard integration help.