Skip to main content

DSP Integration Guide

This guide is for DSPs who transact on EUIDs in the bidstream.

DSPs receive EUID tokens in bid requests, and decrypt the EUID tokens to arrive at raw EUIDs that they can use for bidding, using one of the server-side SDKs that support this function.

For a summary of available server-side SDKs, see SDKs: Summary.

note

If your back end is written in a language not covered by one of the available server-side SDKs, ask your EUID contact in case there is additional information available to help you. If you're not sure who to ask, see Contact Info.

Integration Steps

The following describes the integration workflow for DSP to support EUID as part of RTB, which consists of two major steps:

  1. Honor user opt-outs
  2. Decrypt EUID tokens for RTB use

DSP Flow

Honor User Opt-Outs

This section includes the following information for DSPs, who must honor user opt-out of EUID:

For details about the EUID opt-out workflow and how users can opt out, see User Opt-Out.

Opt-Out Webhook

To receive and honor user opt-outs from the EUID service, the DSP establishes a pre-configured interface (an opt-out webhook/API endpoint) and provides it to the EUID service during onboarding. When a user opts out, the EUID service sends the user's raw EUID and the corresponding opt-out timestamp to the pre-configured interface.

The EUID service sends the following data within seconds of a user's opt-out, which the DSP records and uses the bidding logic defined in Decrypt EUID Tokens for RTB Use.

ParameterDescription
identityThe raw EUID for the user who opted out.
timestampThe time when the user opted out (for information only).

The DSP must respond to the opt-out data with a 200 response code.

The following example illustrates a webhook configured to receive the raw EUID and the corresponding timestamp:

https://dsp.example.com/optout?user=%%identity%%&optouttime=%%timestamp%%

POST /optout/status Endpoint

DSPs can check the opt-out status of raw EUIDs using the POST /optout/status endpoint.

Bidding Opt-Out Logic

Use the logic below during bidding (2-b) to honor a user's opt-out.

Leverage one of the server-side SDKs (see SDKs: Summary) to decrypt incoming EUID tokens into raw EUIDs. The response to the decrypt function contains the raw EUID.

The following diagram illustrates opt-out logic.

DSP Opt-Out Check

If the user has opted out, the EUID must not be used for RTB. In these cases, the DSP can choose to send an alternate ID for bidding or can choose not to bid.

Decrypt EUID Tokens for RTB Use

The following table provides details for Step 2 of the workflow diagram shown in Integration Steps.

StepSDKDescription
2-aServer-side SDK (see SDKs: Summary)Leverage the provided SDK to decrypt incoming EUID tokens. The response contains the EUID and the EUID creation time.
2-bDSPs are required to honor opt-out protocol for EUIDs. For details on configuring user opt-outs and honoring them during bidding, see Honor user opt-outs.

Recommendations for Managing Latency

note

This section refers to the example code in Usage for DSPs in the SDK for C# / .NET Reference Guide. The method names are similar for the Java, Python, and C++ SDKs.

For a low latency/high throughput setup, follow these recommendations:

  • Have a local instance of the BidstreamClient class for each server. This can be in-process or out-of-process. In-process is the easiest.
  • Call the client Refresh method periodically in the background: for example, once per hour, with some randomization to avoid mass simultaneous method calls across all instances after all servers are restarted.
  • When a token needs to be decrypted, call the DecryptTokenIntoRawUid method. In-process is the fastest, but out-of-process is also acceptable if it's done correctly.
    note

    The token decryption method is thread-safe, so you can call it on multiple threads at the same time.

FAQs

For a list of frequently asked questions for DSPs, see FAQs for DSPs.