À partir du 8 septembre 2025, chaque nouvelle ligne devra indiquer si elle diffusera ou non des annonces à caractère politique dans l'Union européenne (UE). Les importations de fichiers SDF et les appels à l'API Display & Video 360 qui ne fournissent pas de déclarations échoueront. Pour savoir comment mettre à jour votre intégration afin d'effectuer cette déclaration, consultez notre page sur les abandons de compatibilité.
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
L'API Display & Video 360 est l'interface programmatique de la plate-forme Display & Video 360. Vous pouvez utiliser l'API Display & Video 360 pour automatiser des flux de travail Display & Video 360 complexes. Voici quelques exemples de tâches que vous pouvez effectuer avec l'API Display & Video 360:
Ce guide explique comment faire vos premiers pas avec l'API Display & Video 360.
Prérequis
Avant d'utiliser l'API Display & Video 360, vous devez effectuer les opérations suivantes:
Vous devez disposer d'un compte Google. Vous devez disposer d'un compte Google pour créer un projet dans la console Google APIs. Si vous avez déjà un compte, vous êtes prêt. Vous pouvez également créer un compte Google distinct à des fins de test.
Vous devez disposer d'un accès à Display & Video 360. Vous devez disposer d'un accès au produit Display & Video 360 pour utiliser l'API. Si votre organisation dispose déjà d'un contrat Display & Video 360, assurez-vous qu'un profil utilisateur avec les autorisations appropriées a été créé pour votre ou vos comptes Google. Si ce n'est pas le cas, contactez notre équipe commerciale pour en savoir plus.
Essayez Display & Video 360. Cette documentation de l'API part du principe que vous avez déjà utilisé Display & Video 360 et que vous connaissez les concepts de programmation Web ainsi que les formats de données Web. Si vous n'avez jamais utilisé Display & Video 360, essayez l'UI Web avant de commencer à coder.
Vous pouvez créer un projet ou utiliser un projet existant.
Créer un projet
Suivez la procédure dans la console Google APIs pour créer un projet et activer automatiquement l'API Display & Video 360.
Utiliser un projet existant
Voici comment activer manuellement l'API Display & Video 360 pour un projet existant.
Pour activer une API pour votre projet, procédez comme suit :
Dans la console Google APIs, ouvrez la bibliothèque des API. Si vous y êtes invité, sélectionnez un projet ou créez-en un. La bibliothèque des API répertorie toutes les API disponibles, regroupées par famille de produits et classées en fonction de leur popularité.
Si l'API que vous souhaitez activer n'apparaît pas dans la liste, utilisez la fonctionnalité de recherche pour la trouver.
Sélectionnez l'API que vous souhaitez activer, puis cliquez sur le bouton Activer.
Si vous y êtes invité, activez la facturation.
Si vous y êtes invité, acceptez les conditions d'utilisation de l'API.
Les instructions suivantes vous expliquent comment créer un ID client OAuth 2.0 à utiliser avec le flux d'application installée. Pour savoir comment générer des identifiants à utiliser avec le flux de compte de service, consultez le guide Comptes de service.
Cliquez sur Créer des identifiants > ID client OAuth.
Sélectionnez le type d'application le plus approprié lorsque vous y êtes invité. Les extraits de code Java et Python proposés dans ces guides supposent une application de bureau, tandis que les extraits de code PHP supposent une application Web.
Saisissez les informations supplémentaires requises.
Si vous créez un ID client pour la première fois, vous pouvez non seulement sélectionner le type d'application, mais aussi configurer votre écran de consentement en cliquant sur le bouton Configurer l'écran de consentement. Vous ne serez plus invité à configurer votre écran de consentement une fois que vous l'aurez fait pour la première fois, bien que ces informations puissent être mises à jour à tout moment.
Cliquez sur Créer.
Une fois l'opération terminée, vous obtiendrez un ID client et un secret client OAuth 2.0, que vous pourrez télécharger au format JSON et enregistrer pour une utilisation ultérieure.
Configurer l'écran de consentement de l'utilisateur
Lorsque vous utilisez OAuth 2.0 pour l'authentification, vos utilisateurs sont authentifiés après qu'ils ont accepté les conditions qui s'affichent sur l'écran d'autorisation de l'utilisateur.
Pour configurer l'écran de consentement de votre projet, procédez comme suit :
Ouvrez la page Écran de consentement dans la console Google API.
Si vous y êtes invité, sélectionnez un projet ou créez-en un.
Remplissez le formulaire, puis cliquez sur Enregistrer.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/08/31 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 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**."]]