自
2025 年 9 月 8 日起,每个新订单项都需要声明是否会投放欧盟 (EU) 政治广告。Display & Video 360 API 和未提供声明的 SDF 上传操作将会失败。如需详细了解如何更新集成以进行此声明,请参阅我们的
弃用页面。
Per iniziare
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
L'API Display & Video 360 è l'interfaccia programmatica della piattaforma Display & Video 360. Puoi utilizzare l'API Display & Video 360 per automatizzare flussi di lavoro complessi di Display & Video 360. Di seguito sono riportati alcuni esempi di attività che puoi svolgere con l'API Display & Video 360:
Questa guida descrive come iniziare a utilizzare l'API di Display & Video 360.
Prerequisiti
Prima di utilizzare l'API di Display & Video 360, devi:
Devi avere un Account Google. Per creare un progetto nella console API di Google, devi disporre di un Account Google. Se hai già un account, non devi fare altro. Ti consigliamo anche di avere un Account Google separato per scopi di test.
Devi disporre dell'accesso a Display & Video 360. Per utilizzare l'API, devi disporre dell'accesso al prodotto Display & Video 360. Se la tua organizzazione ha già un contratto Display & Video 360, assicurati che sia stato creato un profilo utente con le autorizzazioni appropriate per i tuoi Account Google. In caso contrario,
contatta il nostro team di vendita per ulteriori informazioni.
Ti consigliamo di provare Display & Video 360. Questa documentazione dell'API presuppone che tu abbia utilizzato Display & Video 360 e che tu abbia familiarità con i concetti di programmazione web e i formati dei dati web. Se non hai mai utilizzato
Display & Video 360, prova la UI web prima di
iniziare a scrivere codice.
Scegli un progetto
Devi creare o selezionare un progetto nella console API di Google e attivare l'API.
Puoi creare un nuovo progetto o utilizzarne uno esistente.
Crea un nuovo progetto
Segui i passaggi descritti nella console API di Google per creare un progetto e attivare automaticamente l'API Display & Video 360.
Utilizzare un progetto esistente
Ecco come attivare manualmente l'API Display & Video 360 per un progetto esistente.
Per attivare un'API per il tuo progetto:
- Apri la libreria API nella console API di Google. Se richiesto, seleziona un progetto o creane uno nuovo. La libreria API elenca tutte le API disponibili, raggruppate per famiglia di prodotti e popolarità.
- Se l'API che vuoi attivare non è visibile nell'elenco, utilizza la ricerca per trovarla.
- Seleziona l'API che vuoi attivare, poi fai clic sul pulsante Attiva.
- Se richiesto, abilita la fatturazione.
- Se richiesto, accetta i Termini di servizio dell'API.
Generare credenziali
Tutte le richieste che invii all'API Display & Video 360 devono essere autorizzate. Per una breve panoramica dell'autorizzazione, scopri come autorizzare e identificare la tua applicazione per Google.
Le istruzioni riportate di seguito descrivono la procedura per creare un ID client OAuth 2.0 da utilizzare con il flusso dell'applicazione installata. Per istruzioni su come generare le credenziali da utilizzare con il flusso dell'account di servizio, consulta la guida Account di servizio.
Segui i passaggi per configurare un progetto della console API di Google.
- Apri la pagina Credenziali nella console API.
Fai clic su Crea credenziali > ID client OAuth.
Seleziona il tipo di applicazione più pertinente quando richiesto. Gli snippet di codice Java e
Python offerti in queste guide presuppongono un'app desktop, mentre
gli snippet di codice PHP presuppongono un'applicazione web.
Inserisci eventuali informazioni aggiuntive richieste.
- Se è la prima volta che crei un ID client, oltre a poter selezionare il tipo di applicazione, puoi configurare la schermata del consenso facendo clic sul pulsante Configura schermata del consenso. Dopo la prima configurazione, non ti verrà più chiesto di configurare di nuovo la schermata del consenso, anche se queste informazioni possono essere aggiornate in qualsiasi momento.
Fai clic su Crea.
Al termine, ti verranno mostrati un ID client e un client secret OAuth 2.0, che puoi scaricare in formato JSON e salvare per un uso futuro.
Quando utilizzi OAuth 2.0 per l'autenticazione, gli utenti vengono autenticati dopo aver accettato i termini che vengono loro presentati su una schermata di consenso dell'utente.
Per configurare la schermata per il consenso del progetto:
- Apri la pagina Schermata del consenso nella console API di Google.
Se richiesto, seleziona un progetto o creane uno nuovo.
- Compila il modulo e fai clic su Salva.
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-08-31 UTC.
[null,null,["Ultimo aggiornamento 2025-08-31 UTC."],[[["\u003cp\u003eThe Display & Video 360 API allows programmatic access to automate complex workflows within the Display & Video 360 platform, including tasks like creative management, line item targeting, and structured data file generation.\u003c/p\u003e\n"],["\u003cp\u003eBefore using the API, ensure you have a Google Account, access to Display & Video 360, and familiarize yourself with the platform's web UI.\u003c/p\u003e\n"],["\u003cp\u003eYou need to create or select a Google API Console project and enable the Display & Video 360 API to start using it.\u003c/p\u003e\n"],["\u003cp\u003eGenerate OAuth 2.0 credentials for authorization, following the guide for either installed application or service account flow depending on your needs.\u003c/p\u003e\n"],["\u003cp\u003eConfigure a user consent screen for your project within the Google API Console to handle user authentication when using OAuth 2.0.\u003c/p\u003e\n"]]],["The Display & Video 360 API automates tasks like uploading creatives, managing line items and targeting, and generating Structured Data Files. To begin, users need a Google Account and Display & Video 360 access, alongside experience with the platform. They must create or select a project in the Google API Console and enable the API. Credentials, specifically an OAuth 2.0 client ID, must be generated, and the user consent screen must be configured to enable application authorization.\n"],null,["The Display \\& Video 360 API is the programmatic interface for the Display \\& Video 360\nplatform. You can use the Display \\& Video 360 API to automate complex\nDisplay \\& Video 360 workflows. Here are some examples of tasks you can do with the\nDisplay \\& Video 360 API:\n\n- [Upload and build\n creatives.](/display-video/api/guides/creating-creatives/overview)\n- [Manage line items and their\n targeting.](/display-video/api/guides/managing-line-items/overview)\n- [Generate and download Structured Data\n Files.](/display-video/api/guides/downloading-sdfs/create)\n\nThis guide describes how to get started with the Display \\& Video 360 API.\n\nPrerequisites\n\nBefore using the Display \\& Video 360 API, you must do the following:\n\n1. **You must have a Google Account.** You need a\n [Google Account](//www.google.com/accounts/NewAccount) in order to [create a project](#create_project)\n in the Google API Console. If you already have an\n account, then you're all set. You may also want a separate Google Account for\n testing purposes.\n\n2. **You must have access to Display \\& Video 360.** You need access to the\n Display \\& Video 360 product in order to work with the API. If your\n organization already has a Display \\& Video 360 contract, ensure a\n [user profile](//support.google.com/displayvideo/answer/2723011) with appropriate permissions has been\n created for your Google Account(s). If not,\n [contact our sales team](//marketingplatform.google.com/about/display-video-360/) for more information.\n\n3. **You should try out Display \\& Video 360.** This API documentation assumes\n that you've used Display \\& Video 360, and that you're familiar with web\n programming concepts and web data formats. If you haven't used\n Display \\& Video 360, then try out the [web UI](https://displayvideo.google.com/) before\n starting to code.\n\nChoose a project\n\nYou need to [create\nor select a project in the Google API Console and enable the API](https://console.cloud.google.com/start/api?id=displayvideo.googleapis.com&credential=client_key).\n\nYou can create a new project, or use an existing one.\n\nCreate a new project\n\nFollow the steps in the [Google API Console](https://console.cloud.google.com/start/api?id=displayvideo.googleapis.com&credential=client_key)\nto create a project and enable the Display \\& Video 360 API automatically.\n\nUse an existing project\n\nHere's how to manually activate the Display \\& Video 360 API for an existing project.\n\nTo enable an API for your project, do the following:\n\n1. [Open the API Library](https://console.cloud.google.com/apis/library) in the Google API Console. If prompted, select a project or create a new one. The API Library lists all available APIs, grouped by product family and popularity.\n2. If the API you want to enable isn't visible in the list, use search to find it.\n3. Select the API you want to enable, then click the **Enable** button.\n4. If prompted, enable billing.\n5. If prompted, accept the API's Terms of Service.\n\nGenerate credentials\n\nAll requests you make to the Display \\& Video 360 API must be authorized. For a brief\noverview of authorization, read about how to [authorize and identify your\napplication to Google](/display-video/api/guides/how-tos/authorizing).\n\nThe following instructions guide you through the process of creating an OAuth\n2.0 client ID to use with the [installed application\nflow](/identity/protocols/OAuth2InstalledApp). For instructions on generating credentials for use\nwith the service account flow, refer to the [Service Accounts](/display-video/api/guides/how-tos/service-account)\nguide.\n\n1. Follow the steps to [configure a Google API Console project](#create_project).\n\n\n2. Open the [Credentials page](https://console.cloud.google.com/apis/credentials) in the API Console.\n3. Click **Create credentials** \\\u003e **OAuth client ID**.\n\n4. Select the most applicable application type when prompted. The Java and\n Python code snippets offered in these guides assume a **Desktop app** , while\n the PHP code snippets assume a **Web application**.\n\n5. Enter any additional required information.\n\n - If this is your first time creating a client ID, besides being able to select your application type, you can configure your consent screen by clicking the **Configure consent screen** button. You won't get a prompt to configure your consent screen again after you do it the first time, although this information can be updated at any time.\n6. Click **Create**.\n\nWhen done, you'll be presented with an OAuth 2.0 client ID and client\nsecret, which you can download in JSON format and save for later use.\n\nConfigure the user consent screen\n\nWhen you use OAuth 2.0 for authentication, your users are authenticated after\nthey agree to terms presented to them on a user consent screen.\n\n\nTo set up your project's consent screen, do the following:\n\n1. Open the [Consent Screen page](https://console.cloud.google.com/apis/credentials/consent) in the Google API Console. If prompted, select a project or create a new one.\n2. Fill out the form and click **Save**."]]