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.
Chương trình Device Access cho phép người dùng truy cập, kiểm soát và quản lý các thiết bị Google Nest bằng API SDM.
Để bắt đầu sử dụng Device Access, bạn cần hoàn thành các nhiệm vụ sau:
Đăng ký tham gia chương trình Device Access .
Kích hoạt một thiết bị Nest được hỗ trợ bằng Tài khoản Google.
Tạo một dự án Google Cloud để bật API SDM và lấy mã ứng dụng OAuth 2.0.
Tạo một dự án Device Access để nhận Mã dự án.
Đăng ký sử dụng tính năng Quyền truy cập thiết bị
Trước khi tạo dự án đầu tiên, bạn phải đăng ký Device Access.
Khi đăng ký, bạn phải chấp nhận Điều khoản dịch vụ của API Google và Sandbox truy cập thiết bị, cùng với khoản phí một lần không hoàn lại (5 USD) cho mỗi tài khoản.
Bạn sẽ không thể tạo dự án cho đến khi chấp nhận cả hai Điều khoản dịch vụ và thanh toán phí đăng ký. Điều này áp dụng cho tất cả người dùng, cả người dùng cá nhân và những người muốn tạo sản phẩm thương mại.
Hãy xem hướng dẫn sử dụng thiết bị để biết thông tin về cách kích hoạt thiết bị được hỗ trợ.
Thiết lập Google Cloud Platform
Quyền truy cập vào API SDM được cung cấp thông qua Google Cloud. Để bật API và uỷ quyền cho một Tài khoản Google bằng một thiết bị Nest được hỗ trợ, bạn cần có một dự án Google Cloud.
Sử dụng nút Bật API và nhận mã ứng dụng OAuth 2.0 ở bên dưới để bật Smart Device Management API (API Quản lý thiết bị thông minh) và nhận mã ứng dụng OAuth 2.0:
Nếu bạn có một dự án Google Cloud hiện có mà bạn muốn sử dụng cho Device Access, trước tiên, hãy đảm bảo bạn đã đăng nhập vào tài khoản quản trị của dự án đó. Sau đó, chọn dự án hiện có trong danh sách các dự án có sẵn sau khi nhấp vào nút này. Nếu không, hãy tạo một dự án mới.
Chọn Máy chủ web khi ứng dụng hỏi "Bạn đang gọi từ đâu?".
Nhập https://www.google.com làm giá trị cho URI chuyển hướng được uỷ quyền. Bạn cần có URI chuyển hướng để lấy Mã uỷ quyền bằng PCM.
Sau khi thiết lập xong, hãy sao chép các giá trị Mã ứng dụng và Khoá ứng dụng OAuth 2.0 rồi tải tệp JSON Thông tin xác thực xuống máy.
Nếu bạn muốn thiết lập dự án trên Google Cloud theo cách thủ công hoặc xác minh quá trình thiết lập và truy xuất lại thông tin xác thực, hãy làm như sau:
Bật Smart Device Management API trên trang Bật API.
Trên màn hình chính của Console, hãy chọn add_circle_outline Tạo dự án.
Điền vào từng màn hình trong quá trình tạo:
Nhập tên cho dự án.
Nhập mã ứng dụng khách OAuth 2.0 được tạo trong quy trình Thiết lập Google Cloud Platform. Nếu trước đó bạn chưa sao chép mã ứng dụng khách OAuth, thì bạn có thể tìm thấy mã đó trong tệp credentials.json mà bạn đã tải xuống.
Bật hoặc tắt sự kiện. Các sự kiện được Google Cloud Pub/Sub quản lý và cung cấp thông tin cập nhật không đồng bộ cho tất cả thiết bị và cấu trúc được uỷ quyền cho dự án của bạn. Nếu bạn muốn sử dụng sự kiện, hãy chọn Bật sự kiện, sau đó chọn Tạo dự án, rồi chỉnh sửa chủ đề Pub/Sub và cung cấp Mã chủ đề. Nếu bạn không chắc chắn, hãy chọn Tắt.
Bạn luôn có thể bật lại các trò chơi đó sau.
Sau khi hoàn tất, dự án của bạn sẽ được chỉ định một Mã dự án, ở dạng một UUID, chẳng hạn như 32c4c2bc-fe0d-461b-b51c-f3885afff2f0. Hãy ghi lại mã nhận dạng này, bạn sẽ cần mã này cho tất cả các lệnh gọi API SDM.
Mã dự án này được dùng trong các lệnh gọi OAuth và API. Mã này dành riêng cho dự ánDevice Access và không liên quan đến Mã dự án trên Google Cloud.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-06-03 UTC."],[[["\u003cp\u003eThe Device Access program enables users to access and manage Google Nest devices via the SDM API.\u003c/p\u003e\n"],["\u003cp\u003eTo utilize Device Access, users must register for the program, activate a supported Nest device with a Google account, and set up a Google Cloud project for API access.\u003c/p\u003e\n"],["\u003cp\u003eA Device Access project needs to be created, requiring a unique Project ID for all SDM API calls, and users must use a consumer Google Account for registration.\u003c/p\u003e\n"],["\u003cp\u003eSupported devices include all Google Nest Thermostats, Cameras, Doorbells, and Google Nest Hub Max.\u003c/p\u003e\n"]]],[],null,["# Get Started\n\nThe Device Access program allows users to access, control, and manage\nGoogle Nest devices using the SDM API.\n\nTo get started with Device Access, you need to complete the following tasks:\n\n1. Register for the Device Access program.\n2. Activate a supported Nest device with a Google account.\n3. Create a Google Cloud project to enable the SDM API and get an OAuth 2.0 client ID.\n4. Create a Device Access project to receive a Project ID.\n\nRegister for Device Access\n--------------------------\n\nBefore creating your first project, you must register for Device Access.\nRegistration consists of the acceptance of the [Google API](/terms) and [Device\nAccess Sandbox](/nest/device-access/tos) Terms of Service, along with a one-time,\nnon-refundable fee (US$5) per account.\n\nYou will not be able to create a project until you have accepted both Terms of\nService and paid the registration fee. This applies to all users, both\nindividual users and those looking to create a commercial\noffering.\n\nRegister in the Device Access Console, if you haven't already:\n\n[Go to the Device Access Console](https://console.nest.google.com/device-access)\n| **Warning:** You must use a [consumer Google Account](https://support.google.com/work/android/answer/6371476) (for example, a gmail.com account) to register for Device Access. You cannot use a Google Workspace account. If you work for an organization, we suggest registering for Device Access using an account for your team.\n| **Warning:** Once a Google Account is associated with your Device Access Project **it cannot be changed**, be sure you are signed into the correct Google Account before continuing.\n\nSee [Device Access Registration](/nest/device-access/registration) for more\ninformation.\n\nActivate a supported device\n---------------------------\n\nThe following devices are supported in the Device Access program:\n\n- All Google Nest Thermostats\n- All Google Nest Cameras\n- All Google Nest Doorbells\n- Google Nest Hub Max\n\nSee the [Supported Devices](/nest/device-access/supported-devices) page for a\nlisting of individual device models.\n| **Note:** A supported device must be activated with a Google account. Legacy Nest accounts are **not** supported for Device Access. See the [FAQs\n| about accounts for the Nest app](https://support.google.com/googlenest/answer/9297676) for more information on migrating a legacy Nest account.\n\nSee the device manuals for information on how to activate your supported device.\n\nSet up Google Cloud Platform\n----------------------------\n\nAccess to the SDM API is provided through\nGoogle Cloud. To enable the API and authorize a Google account with\na supported Nest device, you'll need a Google Cloud\nproject.\n\nUse the **Enable the API and get an OAuth 2.0 Client ID** button below to enable\nthe **Smart Device Management API** and get an OAuth 2.0 Client ID:\n\n1. If you have an existing Google Cloud project that you would like to use for Device Access, make sure you are logged into the admin account for that project first. Then select the existing project from the list of available projects after clicking the button. Otherwise, create a new project.\n2. Select **Web Server** when it asks \"Where are you calling from?\".\n3. Enter *https://www.google.com* as the value for **Authorized redirect\n URIs**. A redirect URI is required to obtain an Authorization Code using PCM.\n4. Once setup is complete, **copy the OAuth 2.0 Client ID and Client Secret\n values, and download the Credentials JSON to your local machine**.\n\nEnable the API and get an OAuth 2.0 Client ID\n\nIf you want to manually set up your Google Cloud project, or verify\nthe setup and retrieve your credentials again:\n\n1. Enable **Smart Device Management API** on the [API Enablement](https://console.developers.google.com/apis/library/smartdevicemanagement.googleapis.com) page.\n2. Get an OAuth 2.0 Client ID on the [Credentials](https://console.developers.google.com/apis/credentials) page.\n\nCreate a Device Access project\n------------------------------\n\nReturn to the Device Access Console.\n\n1. At the Console home screen, select **add_circle_outline Create\n project**.\n2. Fill out each screen in the creation process:\n 1. Enter a name for your project.\n 2. Enter the OAuth 2.0 Client ID generated during [Set up Google Cloud Platform](#set_up_google_cloud_platform). If you didn't copy your OAuth Client ID earlier, you can find it in the `credentials.json` file you downloaded. **Note:** To use a project with the SDM API:\n | - You must specify a valid OAuth Client ID for the project.\n | - An OAuth Client ID must be valid and unique to a project, and cannot be shared with other projects.\n 3. Enable or disable events. Events are managed by Google Cloud Pub/Sub and provide asynchronous updates for all devices and structures authorized for your project. If you want events, select **Enable events** , then **Create Project** , and then edit the Pub/Sub topic and provide a Topic ID. If you're not sure, select **Disable**. They can always be enabled later.\n3. Upon completion, your project is assigned a Project ID, in the form of a UUID, such as `32c4c2bc-fe0d-461b-b51c-f3885afff2f0`. Make note of this ID, you need it for all SDM API calls.\n\nThis Project ID is used in OAuth and API calls. It is specific to your\nDevice Access project, and is not related to a Google Cloud\nProject ID."]]