Создать учетные данные

Generate and use OAuth 2.0 to authenticate requests to the Display & Video 360 API.

Выберите проект

Use a Google Cloud project to generate OAuth 2.0 credentials.

You can create a new project or use an existing one.

Создать новый проект

Follow the steps in the Google Cloud console to create a project and enable the Display & Video 360 API.

Используйте существующий проект

To activate the Display & Video 360 API for an existing project:

  1. Open the API Library in the Google Cloud console. If prompted, select a project. The API Library lists all available APIs. The Display & Video 360 API is labeled Display & Video 360 API .
  2. If you don't see the API, use the search bar to find it.
  3. Select Display & Video 360 API , then click Enable.
  4. При появлении запроса активируйте оплату.
  5. При появлении запроса примите Условия использования API.

Сгенерировать учетные данные

After you've enabled the API for a project, generate an OAuth 2.0 client ID. Use this client ID to authenticate Display & Video 360 API requests.

To create an OAuth 2.0 client ID to use with an installed application flow :

  1. Выберите свой проект в Google Cloud.
  2. Open the Credentials page in the Google Cloud console.
  3. Нажмите «Создать учетные данные» > «Идентификатор клиента OAuth» .
  4. Select an application type when prompted. The Java and Python code snippets in the provided guides are for a Desktop app . The PHP code snippets are for a Web application .
  5. Enter any other required information. If this is your first time creating a client ID, click Configure consent screen and proceed through the prompts. You can update this information at any time.
  6. Нажмите «Создать».

This creates an OAuth 2.0 client ID and client secret. Download these in JSON format.

When using OAuth 2.0, users agree to terms on a user consent screen before authentication.

Чтобы настроить экран согласия для вашего проекта:

  1. Open the OAuth consent screen page in the Google Cloud console . If prompted, select a project or create a new one.
  2. Заполните форму.
  3. Нажмите « Сохранить ».