API 使用限制
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
限制和配额可保护 Google 基础架构免受使用
Groups Settings API。来自 API 的过多请求可能会导致
无害的拼写错误或设计的效率低下的系统会导致进行不必要的 API 调用。
无论出于何种原因,当来自特定来源的流量达到一定程度时,就会阻止它
是 Google Workspace 系统整体运行状况所必需的。
API 请求失败
在极少数情况下,您的 API 请求失败了,您的应用将会收到 HTTP 状态代码
响应。HTTP 状态代码 403
包含指示哪些 API 配额的错误信息
上限。响应可让您的自定义应用检测错误并采取适当的措施
操作。
具有时效性的请求
如果您需要在固定时间段内完成您的请求,请并行发送请求
或在 Java 或 C# 应用中使用多个线程。例如,按月细分您的请求,或
。如果是线程,请尝试从 10 个线程开始,每个请求一个线程。
线程建议需要权衡利弊,并不适用于所有 API 情况。如果
请求过高,导致出现配额错误。
基于时间的错误
对于所有基于时间的错误(每个线程最多 N 个事件 X 秒),尤其是
503
状态代码错误,我们建议您使用代码捕获异常,并使用
一
指数退避算法
请稍等片刻,然后再重试失败的调用。Groups Settings API 示例:
一个线程需要等待 5 秒,然后重试失败的调用。如果请求成功,请重复此步骤
模式。如果第二个请求没有成功,您的应用应该
缩减请求的频率,直到调用成功为止。例如,增加
将最初的 5 秒延迟到 10 秒,然后再次重试失败的调用。此外,决定重试
上限。例如,在应用之前,以不同的延迟时间重试请求 5 到 7 次
向用户返回错误。
配额
API 配额类别 |
配额 |
每天查询次数 |
您每天最多可进行 10 万次查询。如果您需要超出
您可以从
Google Cloud 控制台中的配额页面 |
群组说明,大小上限 |
您最多可以输入 4,096 个字符的群组说明。
|
组名称、大小上限
|
群组名称最多可包含 60 个字符。
|
defaultMessageDenyNotificationText |
通知文字最多可包含 10,000 个字符。如需详细了解
defaultMessageDenyNotificationText 属性,请参阅
API 参考文档。
|
maxMessageBytes |
默认的邮件大小上限为 1MB。要详细了解maxMessageBytes
属性,请参阅 API 参考。
|
限制
限制类型 |
限制和准则 |
数据格式,默认
|
默认数据格式为 JSON。该 API 还支持 Atom 格式。JSON 和 Atom
数据格式支持完全读写功能。如需了解详情,请参阅
JSON 和 Atom 数据格式。
|
Groups Settings API,启用 |
您必须先启用 Directory API,然后才能调用 Groups Settings API。有关详情
信息,请参阅启用 Google Workspace API。
|
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-29。
[null,null,["最后更新时间 (UTC):2025-08-29。"],[],[],null,["# API usage limits\n\nLimits and quotas protect the Google infrastructure from an automated process that uses the\nGroups Settings API in an inappropriate way. Excessive requests from an API might result from a\nharmless typo or an inefficiently designed system that makes needless API calls.\nRegardless of the cause, blocking traffic from a specific source once it reaches a certain level is\nnecessary for the overall health of the Google Workspace system.\n\nAPI request failures\n--------------------\n\nIn the unlikely event that your API request fails, your application receives an HTTP status code\nresponse. An HTTP status code of `403` has error information indicating which API quotas\nhave been exceeded. The response lets your custom application detect errors and take appropriate\naction.\n\nTime sensitive requests\n-----------------------\n\nIf your requests need to be completed in a fixed period of time, send your requests in parallel\nor use multiple threads in your Java or C# application. For example, break your requests by month or\nanother time period. In the case of threads, try starting with 10 threads, one thread per request.\nThe thread recommendation has tradeoffs and is not useful for all API situations. If the number of\nrequests gets too high, quota errors occur.\n\nTime-based errors\n-----------------\n\nFor all errors that are time based (maximum of N things for X seconds per thread), especially the\n`503` status code errors, we recommend that your code catch the exception, and by using\nan\n[exponential backoff](http://en.wikipedia.org/wiki/Truncated_binary_exponential_backoff)\nalgorithm, wait for a small delay before retrying the failed call. A Groups Settings API example for\none thread is to wait 5 seconds and retry the failed call. If the request is successful, repeat this\npattern for the other threads. If the second request is not successful, your application should\nscale back the frequency of the request until a call is successful. For example, increase the\ninitial 5 second delay to 10 seconds and retry your failed call again. Also, decide on a retry\nlimit. For example retry a request 5 to 7 times with different delay times before your application\nreturns an error to the user.\n\nQuotas\n------\n\n| API quota categories | Quotas |\n|--------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Queries per day | You can make up to 100,000 queries per day. If you need capacity beyond this limit, you can send a request from the [Quotas](https://console.cloud.google.com/iam-admin/quotas) page in the Google Cloud console |\n| Group description, maximum size | You can enter a group description up to 4,096 characters. |\n| Group name, maximum size | A group's name can have up to 60 characters. |\n| `defaultMessageDenyNotificationText` | The notification text can be up to 10,000 characters. To learn more about the `defaultMessageDenyNotificationText` property, see the [API reference](/workspace/admin/groups-settings/v1/reference). |\n| `maxMessageBytes` | The default maximum message size is 1MB. To learn more about the `maxMessageBytes` property, see the [API reference](/workspace/admin/groups-settings/v1/reference). |\n\nLimits\n------\n\n| Types of limits | Limitations and guidelines |\n|---------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Data format, default | The default data format is JSON. The API also supports the Atom format. Both the JSON and Atom data formats support full read-write capabilities. For more information, see [JSON and Atom data formats](/workspace/admin/groups-settings/concepts#json-and-atom-data-formats). |\n| Groups Settings API, enablement | You must turn on the Directory API before making calls to the Groups Settings API For more information, see [Enable Google Workspace APIs.](/workspace/guides/enable-apis) |"]]