Skip to content

Instantly share code, notes, and snippets.

@tonycoco
Last active March 8, 2022 16:27
Show Gist options
  • Save tonycoco/9b14279cf04452acc67543e70466ee08 to your computer and use it in GitHub Desktop.
Save tonycoco/9b14279cf04452acc67543e70466ee08 to your computer and use it in GitHub Desktop.
Google Display & Video 360 Simple Auth
import google.auth
import googleapiclient.discovery
API_NAME = "displayvideo"
API_SCOPES = ["https://www.googleapis.com/auth/display-video"]
API_VERSION = "v1"
credentials, project = google.auth.default(scopes=API_SCOPES)
print(f"Google Cloud Project ID: {project}.")
service = googleapiclient.discovery.build(API_NAME, API_VERSION, credentials=credentials)
service.sdfdownloadtasks().create(body={
# ...
}).execute()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment