Mobile server-to-server ad calls

Typically, ad serving involves a client (such as a web browser or app) making requests directly to OpenX. A server-to-server ad call is an alternative implementation where you proxy ad requests: the client talks to an intermediate (third-party) system, which then makes calls to OpenX. This approach applies to any programmatic integrations, such as custom mobile device implementations, custom desktop applications, and other device-to-server scenarios.

Integration guidelines

Note: Proxied ad requests do not comply with some IAB specifications. To ensure a complete and proper integration via server-to-server ad calls, please visit the OpenX Support Community.

To integrate with a different server (such as your proprietary server) using server-to-server ad calls, you must configure your app to interact with OpenX using the information contained in the ad requestCommunication from a web browser or app to an ad server to display an ad. using the OpenX ad request API.

To ensure that ad serving features (such as frequency cappingUsing cookies to track the impression count of ads served and stop any given ad being shown to a single visitor more than the set number of times. and targeting) work properly when making server-to-server ad calls, follow the guidelines below.

Query arguments

When constructing ad requests, you must include all required mobile ad call parameters, such as app bundle, a device ID, and the tracking flag. In addition to these and other required ad request parameters, we suggest you provide additional information in your server-to-server ad requests, for example, the tz (timezone) parameter.

User IDs

If you are using typical web ad requests, OpenX uses a cookie which contains a unique userA site's total number of users or visitors over a certain length of time. Accuracy depends on each user logging in with a unique cookie to access the site, such as a different browser. ID. The cookie is either i if you are using the domain to fetch ads, or OX_u if you are using another domain. Ideally, you proxy this cookie from the client to the Ad ServerA complete digital advertising platform where publishers sell, manage, and deliver their advertising inventory across all digital formats.. This requires:

  • extraction of the Set-Cookie header that OpenX sends to pass the cookie to the client.

  • retrieval of the cookie sent by the client to your servers.

  • forwarding the cookie to OpenX Ad Server.

Alternatively, you can use the xid parameter.

If you are using the domain to fetch ads, OpenX also sets a pd cookie. This cookie contains the timestamp, which can be used to expire, so that pixels can be re-dropped. OX_u contains the timestamp as well as the unique user ID.

HTTP header forwarding

OpenX uses the following HTTP headers, which should be forwarded from the client or set up to reflect realistic values in your server:

  • Accept-Language

  • Host

  • Referer

  • User-Agent

  • X-Forwarded-For

Important: The User-Agent header is critical for validating requests against known spiders and bots. You must forward the exact client user agent string or ensure that any custom user agent is prepended with "Mozilla Compatible".


Fill out my online form.