Page Summary
-
The latest API version addressed in this document is
v1beta2, a private beta release for trusted testers. -
Access to the
v1beta2API is restricted to allow-listed Google APIs console projects and documentation access is controlled by a separate user allow list. -
You can check if your console project is allow-listed by using a specific URL with your API key.
-
The API is accessed via
https://displayvideo.googleapis.comand only supports OAuth 2.0 authentication with thehttps://www.googleapis.com/auth/display-videoscope. -
The publicly available Google API Client Library for Python can be used to access this API, requiring installation and creation of an authorized service object.
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_KEYIf 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?
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.
Install the google-api-python-client
pip install --upgrade google-api-python-client
Obtain an authorized
credentialsobject. See the Set Up Your Application guide for an example.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)