Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Các yêu cầu gửi tới API Trình quản lý giá thầu phải sử dụng OAuth 2.0 để xác thực.
Trang này giải thích cách tạo thông tin xác thực OAuth 2.0 và sử dụng thông tin đó để
xác thực người dùng.
Để kích hoạt API Trình quản lý giá thầu cho dự án hiện có, hãy hoàn thành các bước sau
các bước:
Mở Thư viện API trong bảng điều khiển Google Cloud. Nếu được nhắc,
chọn một dự án hoặc tạo dự án mới. Thư viện API liệt kê tất cả thư viện có sẵn
API, được nhóm theo nhóm sản phẩm và mức độ phổ biến. API Trình quản lý giá thầu sẽ được gắn nhãn
API Trình quản lý giá thầu DoubleClick.
Nếu không thấy API mà bạn muốn kích hoạt trong danh sách, hãy sử dụng thanh tìm kiếm
để tìm.
Chọn API bạn muốn kích hoạt, sau đó nhấp vào Enable (Bật).
Nếu được nhắc, hãy kích hoạt tính năng thanh toán.
Nếu được nhắc, hãy chấp nhận Điều khoản dịch vụ dành cho API.
Tạo thông tin xác thực
Phần này giải thích cách tạo mã ứng dụng khách OAuth 2.0 để xác thực
các yêu cầu Bid Manager API (API Trình quản lý giá thầu) sau khi bạn chọn một dự án.
Để tạo mã ứng dụng khách OAuth 2.0 để dùng với ứng dụng đã cài đặt
, hãy hoàn thành các bước sau:
Mở trang Thông tin đăng nhập trong bảng điều khiển Google Cloud.
Nhấp vào Tạo thông tin xác thực > Mã ứng dụng OAuth.
Chọn loại ứng dụng thích hợp khi được nhắc. Java và Python
trong hướng dẫn cho nhà phát triển về Bid Manager API (API Trình quản lý giá thầu) là dành cho
Ứng dụng dành cho máy tính. Các đoạn mã PHP dành cho Ứng dụng web.
Nhập các thông tin bắt buộc khác. Nếu đây là lần đầu tiên bạn
khi tạo một mã ứng dụng khách, bạn có thể định cấu hình màn hình xin phép bằng cách nhấp vào
Định cấu hình màn hình xin phép. Bạn sẽ không nhận được lời nhắc thiết lập sự đồng ý
màn hình lần nữa sau khi bạn làm lần đầu tiên, nhưng bạn có thể cập nhật màn hình này
bất cứ lúc nào.
Nhấp vào Tạo.
Khi hoàn tất, bạn sẽ nhận được ID ứng dụng khách OAuth 2.0 và mật khẩu ứng dụng khách mà bạn
có thể tải xuống ở định dạng JSON và lưu để sử dụng sau này.
Định cấu hình màn hình lấy sự đồng ý của người dùng
Khi bạn sử dụng OAuth 2.0 để xác thực, người dùng sẽ được xác thực sau khi
họ đồng ý với các điều khoản trên màn hình xin phép người dùng.
Để thiết lập màn hình xin phép cho dự án, hãy hoàn tất các bước sau:
[null,null,["Cập nhật lần gần đây nhất: 2025-08-31 UTC."],[[["\u003cp\u003eThe Bid Manager API requires OAuth 2.0 for authentication, and this page guides you through generating and using necessary credentials.\u003c/p\u003e\n"],["\u003cp\u003eYou'll need to select or create a Google Cloud project and enable the Bid Manager API before generating credentials.\u003c/p\u003e\n"],["\u003cp\u003eGenerating credentials involves creating an OAuth 2.0 client ID through the Google Cloud console after selecting your project.\u003c/p\u003e\n"],["\u003cp\u003eEnsure you configure the user consent screen, where users will agree to terms before authentication is granted.\u003c/p\u003e\n"],["\u003cp\u003eOAuth 2.0 credentials are sensitive and should be downloaded directly from Google Cloud console and kept secure.\u003c/p\u003e\n"]]],[],null,["# Generate credentials\n\nRequests to the Bid Manager API must use [OAuth 2.0](/identity/protocols/oauth2) for authentication.\nThis page explains how to generate the OAuth 2.0 credentials and use them to\nauthenticate your users.\n\nChoose a project\n----------------\n\nOAuth 2.0 credentials are generated by a Google Cloud project. You need\nto [create or select a project in the Google Cloud console and enable the\nAPI](//console.cloud.google.com/start/api?id=doubleclickbidmanager.googleapis.com&credential=client_key).\n\nYou can create a new project, or use an existing one.\n\n### Create a new project\n\nTo create a project and activate the Bid Manager API, follow the steps in the\n[Google Cloud console](//console.cloud.google.com/start/api?id=doubleclickbidmanager.googleapis.com&credential=client_key).\n\n### Use an existing project\n\nTo activate the Bid Manager API for an existing project, complete the following\nsteps:\n\n1. [Open the API Library](//console.cloud.google.com/apis/library) in the Google Cloud console. If prompted, select a project or create a new one. The API Library lists all available APIs, grouped by product family and popularity. The Bid Manager API is labeled **DoubleClick Bid Manager API**.\n2. If you don't see the API you want to activate in the list, use the search bar to find it.\n3. Select the API you want to activate, then click **Enable**.\n4. If prompted, activate billing.\n5. If prompted, accept the Terms of Service for the API.\n\nGenerate credentials\n--------------------\n\nThis section explains how to generate an OAuth 2.0 client ID to authenticate\nyour Bid Manager API requests, after you've [chosen a project](#choose_a_project).\n\nTo create an OAuth 2.0 client ID to use with the [installed application\nflow](/identity/protocols/OAuth2InstalledApp), complete the following steps:\n\n1. Configure a [Google Cloud console project](#choose_a_project).\n2. Open the **Credentials** page in the Google Cloud console.\n3. Click **Create Credentials** \\\u003e **OAuth client ID**.\n4. Select an appropriate application type when prompted. The Java and Python code snippets in the Bid Manager API developer guides are for a **Desktop app** . The PHP code snippets are for a **Web application**.\n5. Enter any additional required information. If this is your first time creating a client ID, you can configure your consent screen by clicking **Configure consent screen**. You won't get a prompt to configure your consent screen again after you do it the first time, but you can update this information at any time.\n6. Click **Create**.\n\nWhen you're done, you get an OAuth 2.0 client ID and client secret, which you\ncan download in JSON format and save for later use.\n| **Warning:** OAuth credentials are sensitive information. You should download them directly from the Google Cloud console, and shouldn't share them.\n\nConfigure the user consent screen\n---------------------------------\n\nWhen you use OAuth 2.0 for authentication, your users are authenticated after\nthey agree to terms on a user consent screen.\n\nTo set up your project's consent screen, complete the following steps:\n\n1. Open the [OAuth consent screen page](//console.cloud.google.com/apis/credentials/consent) in the Google Cloud console. If prompted, [select a project or create a new one](#choose_a_project).\n2. Fill out the form, then click **Save**."]]