Frequently Asked Questions

General

What's the latest version of the API?

The latest version of the API that this document addresses is v1beta2. This version is a private beta release available to trusted testers.

Who can access the API?

v1beta2 access is only available to allow listed Google APIs console projects. Access to API documentation is controlled by a separate user allow list.

How can I tell if my console project has been allow listed?

Select an API key from your project by clicking on the API_KEY element in the URL below. If an API key doesn't exist for the selected project, you'll be prompted to create one. When done, copy and paste the resulting URL into your browser.

https://displayvideo.googleapis.com/$discovery/rest?version=v1beta2&labels=V1BETA2_TRUSTED_TESTER&key=API_KEY

If you see a JSON description of the API, your project has been allow listed. If you see an error, then you project has not been allow listed.

Using the API

What URL do I use to access the API?

https://displayvideo.googleapis.com

What methods of authentication are supported?

OAuth 2.0 is the only supported method of authentication. All requests must be authorized for the following scope:

  • https://www.googleapis.com/auth/display-video

I want to write code. Where can I find client libraries?

Java

A binary distribution of the Java client library for accessing the API can be found here. This library has a dependency on google-api-client v1.25.0.

This library is intended to be distributed as a Maven artifact, but is not yet hosted in the central Maven repository. To install this artifact manually and create an authorized service object, follow the steps below.

  1. Extract the archive and then install client library as a local maven artifact:

    unzip google-api-services-displayvideo-v1beta2-rev20200915-java-1.25.0.zip
    
    jar xf google-api-services-displayvideo-v1beta2-rev0-1.25.0-sources.jar
    
    mvn install:install-file \
    -Dfile=google-api-services-displayvideo-v1beta2-1.25.0.jar \
    -Dsources=google-api-services-displayvideo-v1beta2-rev0-1.25.0-sources.jar \
    -DpomFile=pom.xml
    
  2. Create an Eclipse maven project or open your existing maven project's pom.xml and add these dependencies:

    <dependencies>
      <dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-displayvideo</artifactId>
        <version>v1beta2-1.25.0</version>
      </dependency>
      <dependency>
        <groupId>com.google.api-client</groupId>
        <artifactId>google-api-client</artifactId>
        <version>1.25.0</version>
      </dependency>
      <dependency>
        <groupId>com.google.http-client</groupId>
        <artifactId>google-http-client-jackson2</artifactId>
        <version>1.25.0</version>
      </dependency>
      <dependency>
        <groupId>com.google.oauth-client</groupId>
        <artifactId>google-oauth-client-jetty</artifactId>
        <version>1.25.0</version>
      </dependency>
    </dependencies>
    

  3. Create authorized Credential and DisplayVideo objects. See the Set Up Your Application guide for an example.

Python

The publicly available Google API Client Library for Python can be used to access this API. To install the library and create an authorized service object, follow the steps below.

  1. Install the google-api-python-client

    pip install --upgrade google-api-python-client
    
  2. Obtain an authorized credentials object. See the Set Up Your Application guide for an example.

  3. Create an authorized service object using the discovery service.

    api_key = 'API_KEY'
    api_name = 'displayvideo'
    api_url = 'https://%s.googleapis.com/' % api_name
    api_version = 'v1beta2'
    
    discovery_url = (
        '%s/$discovery/rest?key=%s&version=%s&labels=%s'
        % (api_url, api_key, api_version, 'V1BETA2_TRUSTED_TESTER')
    )
    
    service = discovery.build(api_name, api_version,
                              discoveryServiceUrl=discovery_url,
                              http=credentials)