Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
Это высокоуровневый процесс работы с API платформ:
- Создайте новый проект Google Cloud (или используйте существующий)
- Создайте учетную запись службы в своем проекте Google Cloud и отправьте ее в Google через менеджера учетной записи, чтобы добавить ее в свою учетную запись AdSense.
- Включите API платформы AdSense для своего проекта Google Cloud (обратите внимание, что эта страница видна только проектам из белого списка).
- Создать сервисный ключ
- Используйте библиотеки OAuth Google для создания токена доступа.
- Вызов API платформы AdSense с помощью HTTP-запросов.
Шаги с 1 по 5 описаны на странице «Аутентификация вызовов API» , а API — на соответствующих страницах:
Если не указано иное, контент на этой странице предоставляется по лицензии Creative Commons "С указанием авторства 4.0", а примеры кода – по лицензии Apache 2.0. Подробнее об этом написано в правилах сайта. Java – это зарегистрированный товарный знак корпорации Oracle и ее аффилированных лиц.
[null,null,[],[[["\u003cp\u003eCustomChannel is a resource representing a custom channel, providing a way to segment ad revenue based on specific criteria.\u003c/p\u003e\n"],["\u003cp\u003eIt has fields like \u003ccode\u003ename\u003c/code\u003e, \u003ccode\u003ereportingDimensionId\u003c/code\u003e, \u003ccode\u003edisplayName\u003c/code\u003e, and \u003ccode\u003eactive\u003c/code\u003e for identification and configuration.\u003c/p\u003e\n"],["\u003cp\u003eYou can manage CustomChannels using methods like create, delete, get, list, listLinkedAdUnits, and patch to control their lifecycle and relationships with ad units.\u003c/p\u003e\n"],["\u003cp\u003eRefer to the provided links for detailed information on each method and field.\u003c/p\u003e\n"]]],["To utilize the Platforms API, first, establish a Google Cloud project and create a service account, sending it to Google. Then, enable the AdSense Platform API for the project and generate a service key. Use Google's OAuth libraries to obtain an access token. Finally, make HTTP requests to call the AdSense Platform APIs. These APIs enable creating, getting accounts, adding event data, adding sites, and requesting site reviews. Steps to generate the service key and authentication are available at [Authenticating API calls](/adsense/platforms/api/authenticating-api-calls).\n"],null,["Getting started with the Platforms API\n--------------------------------------\n\nThis is the high-level process to get going with the Platforms API:\n\n1. Create a new Google Cloud project (or use an existing one)\n2. Create a service account in your Google Cloud project, and send the account to Google via your account manager to get it added to your AdSense account\n3. Enable the [AdSense Platform API](https://console.cloud.google.com/apis/api/adsenseplatform.googleapis.com) for your Google Cloud project (note that this page is only visible to allowlisted projects)\n4. [Create a service key](/adsense/platforms/api/authenticating-api-calls#step_4_create_a_service_key)\n5. Use Google's OAuth libraries to generate an access token\n6. Call the AdSense Platform APIs using HTTP requests\n\nSteps 1 to 5 are described in the [Authenticating API calls](/adsense/platforms/api/authenticating-api-calls) page, and the APIs are described in their respective pages:\n\n- [Creating an account](/adsense/platforms/reference/rest/v1/platforms.accounts/create)\n- [Getting an account](/adsense/platforms/reference/rest/v1/platforms.accounts/get)\n- [Adding event data to an existing account](/adsense/platforms/reference/rest/v1/platforms.accounts.events/create)\n- [Adding a site to an existing account](/adsense/platforms/reference/rest/v1/platforms.accounts.sites/create)\n- [Requesting review for an existing site](/adsense/platforms/reference/rest/v1/platforms.accounts.sites/requestReview)"]]