Authenticate ad pod requests

Google Dynamic Ad Insertion (DAI) starts the ad decision process for an ad break when the following occur:

  • You use the Ad break API to create the ad break entity for upcoming ad breaks.
  • You authenticate your ad pod requests by including an HMAC token.

We recommend using the Ad Break API. If the Ad break API fails or not used, you must authenticate your ad pod requests with Hash-Based Message Authentication Code (HMAC) tokens.

Before you begin

Before you continue, make sure you have the following from the Google Ad Manager UI:

  • A DAI authentication key with the type HMAC. If you don't have a key, do the following:

    1. Go to Admin > Video and audio.
    2. Select DAI authentication keys.
    3. Click New DAI authentication key.
    4. From the drop-down, select type HMAC.
    5. Enter a name and select Save.
  • A livestream configured for DAI.

Enable authentication for ad pod requests

To support authenticated requests, enable pod resource keys in your livestream event and linking DAI authentication key to your livestream. You use the linked DAI authentication key to generate an HMAC token for authenticating your ad pod requests. To link your HMAC key to your livestream, do the following:

  1. In the Google Ad Manager UI, navigate to Video > Live streams.
  2. Select your livestream from the list.
  3. Enable Pod resource authentication keys.
  4. Select and add the HMAC Key you identified in the prerequisites.
  5. Save your changes.

For more information, see Set up a livestream for DAI.

For your specific request type, complete the following:

To generate HMAC tokens for testing, use the HMAC Token Generator.