Getting credentials
Account authentication and public ad-serving identifiers are separate. Use the website onboarding unless you have a confirmed backend integration contract.
Website onboarding
- Create a publisher account and complete requested email verification.
- Register your property in the publisher workspace. Source responses include
idandapi_key. Web properties require domain ownership verification before serving. - Create an eligible placement. Its
idbecomes the serving request’sslot_id. - Confirm runtime availability, origin approval, consent and safe testing before requesting live ads.
Authentication boundaries
The website uses Firebase authentication and an HTTP-only website session. The backend account API has its own signup/login and bearer-token contract. A website __session cookie is not documented as a backend bearer token. Never paste account tokens or private payment credentials into client-side code.
The pk_ site-scoped ad-serving key is a public integration identifier; it does not grant dashboard or administrative access.
Backend source contract
For authorized direct API integrations, inspected source routes use backend account authentication. Confirm account provisioning and the live contract before automating. These examples are request shapes; they do not execute account creation or serve ads.
POST /api/v1/publishers/sites
Authorization: Bearer YOUR_BACKEND_ACCOUNT_TOKEN
Content-Type: application/json
{"name":"My Website","domain":"example.com","kind":"web"}
# Site response includes: id, api_key, status, next_step.
POST /api/v1/publishers/sites/YOUR_SITE_ID/slots
Authorization: Bearer YOUR_BACKEND_ACCOUNT_TOKEN
Content-Type: application/json
{"name":"Homepage banner","format":"banner","size":"300x250"}
# Slot response includes: id, site_id, format, size.Formats and safe testing
Banner and image creative paths exist in the SDK source. Native and interstitial presentation need runtime-specific integration. Video uses a separate VAST path with a Web playback helper; rewarded delivery and reward verification are not established for all SDKs. A normal production serve request may bill demand; use local mocks or a verified sandbox path.Continue with the safe quickstart, runtime matrix and request contract.