Sẵn sàng sử dụng API Mọi người
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.
Trước khi có thể bắt đầu lập trình ứng dụng đầu tiên của mình, bạn cần thực hiện 3 việc sau:
- Tạo tài khoản Google
- Tạo dự án
- Thiết lập ứng dụng
Hướng dẫn này sẽ chỉ cho bạn những việc cần làm nếu bạn chưa thực hiện.
1. Tạo tài khoản Google
Bạn cần có Tài khoản Google để tạo dự án trong Google API Console. Nếu đã có
tài khoản, thì bạn đã hoàn tất. Bạn cũng có thể cần một Tài khoản Google riêng cho mục đích thử nghiệm.
2. Tạo một dự án cho ứng dụng của bạn
Để có thể gửi yêu cầu đến API Người dùng, bạn cần cho Google biết về ứng dụng khách của mình và kích hoạt quyền truy cập vào API. Bạn thực hiện việc này bằng cách sử dụng Google API Console để tạo một dự án, một tập hợp các chế độ cài đặt và thông tin truy cập API được đặt tên, đồng thời đăng ký ứng dụng của bạn.
Để bắt đầu sử dụng API Người dùng, trước tiên, bạn cần sử dụng công cụ thiết lập. Công cụ này sẽ hướng dẫn bạn cách tạo dự án trong Bảng điều khiển API của Google, bật API và tạo thông tin đăng nhập.
3. Thiết lập ứng dụng
Nếu bạn đang dùng một trong những ngôn ngữ được hỗ trợ, hãy cân nhắc dùng một trong những thư viện ứng dụng. Trước khi có thể đưa ra yêu cầu đối với API, bạn phải thiết lập uỷ quyền.
Hãy xem
mã mẫu bắt đầu nhanh
hướng dẫn cách tìm nạp danh sách người liên hệ bằng nhiều ngôn ngữ.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-08-29 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-29 UTC."],[[["\u003cp\u003eTo begin coding your client application, you must first obtain a Google Account, create a project in the Google API Console, and set up your app.\u003c/p\u003e\n"],["\u003cp\u003eCreating a project involves informing Google about your client and activating API access using the Google API Console, where you can register your application and manage settings.\u003c/p\u003e\n"],["\u003cp\u003eBefore making requests to the API, ensure you've set up authorization and consider utilizing client libraries if your language is supported.\u003c/p\u003e\n"]]],["To start coding, you must first obtain a Google Account. Then, use the Google API Console to create a project, which involves registering your application and enabling API access via the setup tool. Finally, set up your application, potentially using a client library and ensuring proper authorization before making API requests. Sample code is available to demonstrate fetching a list of contacts in various languages.\n"],null,["# Get Ready to Use the People API\n\nBefore you can start coding your first client application, you need to do three\nthings:\n\n1. Get a Google Account\n2. Create a project\n3. Set up your app\n\nThis guide walks you through those tasks, if you haven't done them already.\n\n1. Get a Google Account\n-----------------------\n\nYou need a [Google Account](https://www.google.com/accounts/NewAccount) in order\nto [create a project](#project) in the Google API Console. If you already have\nan account, then you're all set. You may also want a separate Google Account for\ntesting purposes.\n\n2. Create a project for your client\n-----------------------------------\n\nBefore you can send requests to the People API, you need to tell Google\nabout your client and activate access to the API. You do this by using the Google API Console to create a project, which is a named collection of\nsettings and API access information, and register your application.\n\nTo get started using People API, you need to first\n[use\nthe setup tool](https://console.cloud.google.com/start/api?id=people.googleapis.com&credential=client_key), which guides you through creating a project in the\nGoogle API Console, enabling the API, and creating credentials.\n\n3. Set up your app\n------------------\n\nIf you are using one of the supported languages, consider using one of the\n[client libraries](/people/v1/libraries). Before you can make requests to the\nAPI, you must set up [authorization](/people/v1/how-tos/authorizing).\n\nTake a look at the\n[quick start sample code](https://developers.google.com/people/quickstart/js)\nwhich shows you how to fetch a list of contacts in a variety of languages."]]