برای استفاده از یک پروژه با SDM API، باید یک OAuth Client ID برای پروژه مشخص کنید.
برای دسترسی به دستگاه ثبت نام کنید
قبل از ایجاد اولین پروژه خود، باید در آن ثبت نام کنید Device Access. ثبت نام شامل پذیرش Google API و شرایط سرویس Sandbox دسترسی به دستگاه ، همراه با یک بار هزینه غیرقابل استرداد (5 دلار آمریکا) برای هر حساب است.
تا زمانی که هر دو شرایط خدمات را نپذیرفته باشید و هزینه ثبت نام را پرداخت نکرده باشید، نمی توانید پروژه ای ایجاد کنید. این برای همه کاربران، چه کاربران فردی و چه کسانی که به دنبال ایجاد یک پیشنهاد تجاری هستند، صدق می کند.
ثبت نام در Device Access کنسول، اگر قبلاً این کار را نکرده اید:
در صفحه اصلی کنسول، add_circle_outline ایجاد پروژه را انتخاب کنید. اگر این گزینه را نمی بینید، در حال حاضر در محدودیت حساب خود هستید و نمی توانید پروژه دیگری ایجاد کنید.
هر صفحه را در فرآیند ایجاد پر کنید:
یک نام برای پروژه خود وارد کنید.
اختیاری. شناسه مشتری OAuth 2.0 را از پروژه Google Cloud خود وارد کنید. اگر هنوز شناسه مشتری ندارید، میتوانید از این رد شده و بعداً آن را بهروزرسانی کنید. برای دستورالعملهای نحوه دریافت شناسه مشتری ، به راهاندازی پلتفرم Google Cloud مراجعه کنید.
فعال یا غیرفعال کردن رویدادها رویدادها توسط Google Cloud Pub/Sub مدیریت میشوند و بهروزرسانیهای ناهمزمان را برای همه دستگاهها و ساختارهای مجاز برای پروژه شما ارائه میدهند. اگر رویدادها را می خواهید، فعال کردن رویدادها ، سپس ایجاد پروژه را انتخاب کنید، و سپس موضوع Pub/Sub را ویرایش کنید و شناسه موضوع ارائه دهید. اگر مطمئن نیستید، Disable را انتخاب کنید. آنها همیشه می توانند بعداً فعال شوند.
پس از تکمیل، به پروژه شما یک شناسه پروژه، به شکل UUID، مانند 32c4c2bc-fe0d-461b-b51c-f3885afff2f0 اختصاص داده می شود. این شناسه را یادداشت کنید، برای همه تماسهای SDM API به آن نیاز دارید.
این شناسه پروژه در تماسهای OAuth و API استفاده میشود. مخصوص شماستDevice Access پروژه، و به شناسه پروژه Google Cloud مرتبط نیست.
محیط پروژه
هنگامی که پروژه شما ایجاد شد، محیط روی Sandbox تنظیم می شود. همه پروژه ها در این محیط شروع می شوند.
اگر قصد استفاده دارید Device Access برای استفاده شخصی، نیازی به انجام کار دیگری ندارید. پروژه شما در Sandbox باقی خواهد ماند.
اگر قصد استفاده دارید Device Access به عنوان بخشی از پیشنهاد خانه هوشمند تجاری، برای مراحل بعدی به درخواست توسعه تجاری مراجعه کنید.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eDevice Access projects are created within the Sandbox environment and require a one-time registration fee of US$5 per Google Account.\u003c/p\u003e\n"],["\u003cp\u003eEach Google Account can have up to 3 projects, with each project needing a unique OAuth 2.0 Client ID for SDM API usage.\u003c/p\u003e\n"],["\u003cp\u003eProjects can be used for personal use in the Sandbox environment indefinitely or transitioned to commercial use by applying through a separate process.\u003c/p\u003e\n"],["\u003cp\u003eDuring project creation, you can optionally enable Google Cloud Pub/Sub for asynchronous device and structure updates, but it can also be enabled later.\u003c/p\u003e\n"],["\u003cp\u003eWhen registering for Device Access, ensure you use a consumer Google Account and understand it cannot be changed once associated with a project.\u003c/p\u003e\n"]]],[],null,["All new projects created have access to the Device Access Sandbox\nenvironment by default.\n\n- You can create up to 3 projects for a single account.\n- Multiple projects can use the same Project Name, which is displayed during the [Authorization process](/nest/device-access/authorize).\n- Each account is subject to [rate and user\n limits](/nest/device-access/project/limits).\n\nTo use a project with the SDM API, you must specify an OAuth\nClient ID for the project.\n\nRegister for Device Access\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\nCreate your project\n\nOnce registered, create a project:\n\n1. At the Console home screen, select **add_circle_outline Create\n project**. If you don't see this option, you're already at your account's limit and cannot create another project.\n2. Fill out each screen in the creation process:\n 1. Enter a name for your project.\n 2. *Optional.* Enter the OAuth 2.0 Client ID from your Google Cloud project. You can skip this and update it later if you don't have a Client ID yet. See [Set up Google Cloud Platform](/nest/device-access/get-started#set_up_google_cloud_platform) for instructions on how to obtain a Client ID. **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.\n| **Caution:** Exiting the project creation flow at any time during the process will discard all data you have entered.\n\nProject environment\n\nOnce your project is created, the environment is set to Sandbox . All\nprojects start in this environment.\n\nIf you plan to use Device Access for personal use, you don't need to do anything\nelse. Your project will remain in the Sandbox.\n\nIf you plan to use Device Access as part of a Commercial smart home\noffering, see [Apply for Commercial Development](/nest/device-access/project/apply) for next\nsteps."]]