OnwardOnward
  • Public docs
  • Internal docs
  • Guides
  • Public API Reference
  • Internal documentation
IntroductionAuthentication
Partner integrations
    Platform integrationAdvertiser integration
Account linking
Rewarding user
Errors
Partner integrations

Platform integration

The Platform is the user-facing entry point. It displays quest chains, keeps progress visible, initiates account linking, and reports events that happen inside the Platform.

Responsibilities

ResponsibilityDescription
User identityKeep a stable platform_user_id and register or synchronize the user with Onward.
Chain displayFetch active quest chains and render tasks, progress, and rewards.
Platform eventsReport actions that occur inside the Platform.
Account linkingRedirect the user to the authorization URL for advertiser-side tasks.
Reward UXLet eligible users claim rewards and show the resulting state.

Typical flow

The diagram shows a Signed Token Callback integration. For an OAuth 2.0 Advertiser, the Platform steps are unchanged: Onward returns the correct Advertiser URL and completes the configured OAuth exchange after the redirect.

Rendering diagram…
Platform journey using Signed Token Callback account linking and subsequent progress updates.

Reading active chains

Call GET /v1/quest-chains/active/{platformUserId} from the Platform backend. The response distinguishes an unknown user from a known user with no active chains:

  • user.exists: false means Onward does not know the requested Platform user.
  • user.exists: true with an empty quest_chains array means the user currently has no active chain.

Tasks are returned in sequence_number order. For step-by-step chains, a locked task is not yet reachable and is an API presentation state rather than a database status.

When a task requires an advertiser account, continue with the Account linking guide.

Channel headers

Onward reports where users come from — web, iOS or Android — and where they start quest chains. Because the Platform backend calls Onward server-to-server, Onward cannot see the end user's device itself, so the Platform states the channel explicitly.

On every GET /v1/quest-chains/active/{platformUserId} call made on behalf of a user, send:

HeaderRequiredValue
X-Onward-ChannelYesweb, ios or android: the frontend showing the quest chains.
X-Onward-User-AgentNoThe end user's own User-Agent, forwarded verbatim.
Code
GET /v1/quest-chains/active/user_123 x-api-key: <platform-key> x-api-secret: <platform-secret> X-Onward-Channel: ios X-Onward-User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X) ...

Send the channel itself rather than relying on the User-Agent alone: a quest chain screen embedded in a mobile app's WebView has nearly the same User-Agent as the mobile website.

  • A missing, empty or unrecognized X-Onward-Channel is recorded as unknown and logged on the Onward side. The request is never rejected because of these headers.
  • Calls the Platform makes on its own — cache warm-up, prefetching, server-side rendering — are not user visits. Send X-Onward-Channel: background on them so they are not counted.
  • Later actions of the user — POST /v1/account/start-connect, POST /v1/rewards/claim, POST /v1/chains/rewards/claim and the Advertiser's account connection — are attributed to the channel of the user's last quest chain request. On these calls the headers are optional: send them to attribute an action precisely when the same user may have the website and the app open at once.

Direct advertiser linking

When the Platform and Advertiser are the same party — or the Platform controls the Advertiser backend — account linking can be completed in a single register call without a redirect flow.

Supply advertiser_user_id in the request body alongside the advertiser API key headers:

Code
POST /v1/account/register x-api-key: <platform-key> x-api-secret: <platform-secret> x-advertiser-api-key: <advertiser-key> x-advertiser-api-secret: <advertiser-secret> { "platform_user_id": "user_123", "advertiser_user_id": "adv_user_456" }

Onward atomically registers the user (or finds an existing one) and links the advertiser account. Segmentation and reconciliation run as a best-effort background step after the commit: if segmentation times out, the response is still successful and the job is retried via the outbox. The response is identical to a standard register call.

Requirements:

  • Both advertiser_user_id and the advertiser key headers must be provided together — one without the other returns a 400 error.
  • The advertiser API key must have the can_users_connect_account permission.
  • This endpoint must be called server-to-server only. Never expose advertiser credentials to client-side code.

Note: direct linking emits a link_account event after segmentation and chain join complete. If a pending linking task is visible to the user, it will be closed automatically — but may take a few seconds after the register call returns.

User experience

  • Refresh progress after sending an event or returning from an account connection.
  • Preserve task order and honor allow_any_order from the chain.
  • Use names and descriptions directly in the UI, but provide graceful fallbacks for nullable images and descriptions.
  • Treat an empty chain list as a normal state.
Last modified on October 19, 2026
AuthenticationAdvertiser integration
On this page
  • Responsibilities
  • Typical flow
  • Reading active chains
  • Channel headers
  • Direct advertiser linking
  • User experience