Notification

Only available in Google Ad Manager 360.

Authenticate DAI video stream requests

Learn how to create authentication keys in Ad Manager

Dynamic ad insertion (DAI) authentication keys are used to prove that video stream requests are coming from you. They provide better security during ad serving. A key is an unbroken string of 64 characters and numbers. Some older keys may be 25 characters or numbers.

For example:
0L94DEA6C87B0F3D2407018ACF88ECDE77DK38AD1DX01957311A50E9D1O3F15B

There are two options when creating an authentication key, and the procedure is the same for both:

Static API keys: API keys take precedence over HMAC when both are included. API keys are less secure than HMAC keys. Use of HMAC keys is therefore recommended.

HMAC (Beta) : HMAC-based token authentication provides more security than staticAPI keys. HMAC tokens use a secret key and limited duration to ensure the token cannot be easily shared across users or sessions.

Add a new authentication key

  1. Sign in to Google Ad Manager.
  2. Click Admin and then Video and then DAI authentication keys.
  3. Click New authentication key.
  4. Enter a Name that will help you identify this key.
  5. Select the type of authentication key—either API or HMAC.

    API keys take precedence over HMAC when both are included. API keys are less secure than HMAC keys.

  6. Click Save.

To view and copy your key, return to the details page. Once you create an active DAI authentication key, you can use it immediately. Embed the key where ads are dynamically inserted.

Keys are automatically set to "Active" upon save. Only correctly implemented "Active" keyscan validate requests.

Requests using deactivated keys are denied. Only deactivate a key if it becomes compromised or should not be used.

Deactivate an existing authentication key

  1. Sign in to Google Ad Manager.
  2. Click Admin and then Video and then DAI authentication keys.
  3. Click the name of the key you want to deactivate.
  4. Select Inactive as the status.
  5. Click Save.

Implement an authentication key

HMAC keys (Beta) 

Learn how to implement HMAC authentication.

API keys

Use the IMA SDK to set the apiKey property on the IMAStreamRequest object. See the iOS, Android, Chromecast, or tvOS developer documentation for more information.

For server-side beaconing (SSB), use the api-key query parameter:

curl "https://dai.google.com/ondemand/hls/content/CMS_ID/vid/VIDEO_ID/master.m3u8?api-key=<api-authentication-key>"

For any issues related to DAI troubleshooting or outages, contact publisher support.

Was this helpful?

How can we improve it?
true
Get started with Dynamic Ad Insertion

Our guide to delivering a seamless ad experience across live, linear, and on-demand video content.
See the guide

Search
Clear search
Close search
Google apps
Main menu
2779520581862227200
true
Search Help Center
true
true
true
true
true
148
false
false