此外,為保護裝置電池,我們會在專案和指令 (devices.executeCommand) 中實作裝置例項層級的限制。這些限制適用於每分鐘查詢次數和每小時查詢次數,但不適用於 get 和 list API 方法。
舉例來說,假設專案 A 和專案 B 都能存取同一部裝置 (裝置 A),可能是因為使用者授權了兩個不同的商業整合,而這兩個整合都使用同一部裝置。如果專案 A 在一分鐘內傳送了 4 個指令給裝置 A,則專案 B 在同一分鐘內只能傳送 1 個指令給裝置 A,否則就會達到裝置執行個體層級的速率限制。此時,系統會限制這兩個專案傳送至裝置 A 的指令,直到傳送至裝置 A 的第一個指令所屬分鐘結束為止。
[null,null,["上次更新時間:2025-07-29 (世界標準時間)。"],[[["\u003cp\u003eDevice Access projects have usage limits based on the environment (Sandbox or Commercial) and the user's Commercial offering type.\u003c/p\u003e\n"],["\u003cp\u003eRate limits are implemented to ensure the Nest service remains available and prevent excessive API requests impacting performance.\u003c/p\u003e\n"],["\u003cp\u003eSandbox users have limits on the number of users, structures, and projects they can create for testing and evaluation.\u003c/p\u003e\n"],["\u003cp\u003eThe SDM API enforces rate limits at various levels including per API method, per command, and per device instance to manage resource usage and protect device battery life.\u003c/p\u003e\n"],["\u003cp\u003eExceeding rate limits will result in throttling and API errors, prompting developers to adjust their integration's request frequency.\u003c/p\u003e\n"]]],[],null,["# User and Rate Limits\n\nDevice Access projects are restricted by user, structure, and rate limits,\ndepending on the environment and type of Commercial offering.\n\nWe want developers to create compelling user experiences, but we also want the\nNest service and devices to always be available for the user. Integrations that\nmake a large number of requests in a given period of time can impact service and\ndevice availability, so the SDM API applies rate limits.\nRate limiting restricts the number of API calls for a given time period and\nprevents overutilization of resources.\n\nLimits by environment\n---------------------\n\nAll projects begin in the Sandbox environment. The Sandbox is\nintended for evaluation of the SDM API and personal use, and\nlimits are restricted accordingly. Environments with larger user bases, such as\nCommercial Development , have different limits.\n\nSandbox user limits\n-------------------\n\nA developer account in the Sandbox is limited to 25 users across 5\nstructures across all projects. There is a limit of 3 projects per account.\n\nStructures are limited to 5 users each, so the user limit will only be reached\nonce all 5 structures are maxed out with 5 users each. The developer account\n(which owns the project) does not count towards the 5 user limit for a\nstructure.\n\nConversely, if a project has 15 users over 5 structures, additional users can\nonly be added to the existing 5 structures, as the structure limit has\nalready been reached.\n\nSandbox rate limits\n-------------------\n\nThe Sandbox is rate limited at 3 different levels. Limits are set at\nqueries per minute (QPM) unless otherwise noted.\n\n### API level\n\nAPI calls are limited per project, per user. See the [API\nReference](/nest/device-access/reference/rest) for more information on individual\nmethods.\n\n| API Method | Rate Limit |\n|--------------------------|------------|\n| `devices.executeCommand` | 10 QPM |\n| `devices.get` | 10 QPM |\n| `devices.list` | 5 QPM |\n| `structures.get` | 5 QPM |\n| `structures.list` | 5 QPM |\n| `structures.rooms.get` | 5 QPM |\n| `structures.rooms.list` | 5 QPM |\n\n### Command level\n\nEach trait command (`devices.executeCommand`) is limited to 5 QPM per project,\nper user, per device.\n\nThat means if a project has 2 users with 2 devices each (4 total devices), the\nsame command can be called 5 times in a minute for each of those 4 devices.\n\nHowever, if a project has 2 users with 3 devices each for 6 total devices, the\nsame command could **not** be called 5 times in a minute for each of those 6\ndevices. This would result in 15 QPM for each user, when the\n`devices.executeCommand` API level rate limit for a project's user is 10 QPM.\n\n### Device instance level\n\nAdditionally, device instance level limits are implemented across projects and\ncommands (`devices.executeCommand`) for device battery protection. These limits\nare applied at both the QPM and queries per hour (QPH) levels and do not apply\nto the `get` and `list` API methods.\n\nFor example, suppose Project A and Project B both have access to the same\ndevice, Device A (perhaps the user has authorized two different commercial\nintegrations that use the same device). If Project A has sent 4 commands to\nDevice A within a minute, then Project B can only send 1 command to Device A in\nthat same minute before the device instance level rate limit is hit. At that\npoint, commands from both Projects to Device A are throttled until the end of\nthe minute that began with the first command to Device A.\n\nIf a device type is not listed below, it does not have device instance level\nrate limits.\n\n| Device Type | Device Instance Rate Limit |\n|-------------|----------------------------|\n| THERMOSTAT | 5 QPM or 100 QPH |\n| CAMERA | 30 QPM or 100 QPH |\n| DOORBELL | 30 QPM or 100 QPH |\n\n\nErrors\n------\n\nThe following error code(s) may be returned in relation to this guide:\n\n| Error Message | RPC | Troubleshooting |\n|---------------|----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Rate limited. | `RESOURCE_EXHAUSTED` | Each developer has a quota limiting how many calls they can make. If you make more calls than your quota, you will receive the Rate limited message. To fix this, resubmit the call once the quota has expired. |\n\nSee the [API Error Code Reference](/nest/device-access/reference/errors/api) for\nthe full list of API error codes.\n\n\u003cbr /\u003e"]]