محدودیت ها و سهمیه های استفاده
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
محدودیتها و سهمیهها از زیرساخت Google در برابر فرآیند خودکاری محافظت میکنند که از API تنظیمات مدیریت به روشی نامناسب استفاده میکند. درخواستهای بیش از حد از یک API ممکن است ناشی از یک اشتباه تایپی بیضرر باشد، یا ممکن است ناشی از طراحی ناکارآمد سیستمی باشد که تماسهای API بیضروری را ایجاد میکند. صرف نظر از علت، مسدود کردن ترافیک از یک منبع خاص پس از رسیدن به سطح مشخصی برای سلامت کلی سیستم Google Workspace ضروری است. این تضمین می کند که اقدامات یک توسعه دهنده نمی تواند تأثیر منفی بر جامعه بزرگتر بگذارد.
در صورتی که درخواست API شما ناموفق باشد، پاسخ کد وضعیت HTTP را دریافت خواهید کرد. کد وضعیت 403 دارای اطلاعات خطا در مورد ورودی نادرست است و کد وضعیت HTTP 503 دارای اطلاعات خطایی است که نشان می دهد از سهمیه های API فراتر رفته است. این پاسخ ها به برنامه سفارشی شما اجازه می دهد تا این خطاها را شناسایی کرده و اقدامات مناسب را انجام دهد.
اگر درخواستهای شما باید در یک بازه زمانی مشخص تکمیل شوند، درخواستهای خود را به صورت موازی ارسال کنید یا از چندین رشته در برنامه جاوا یا سی شارپ خود استفاده کنید. به عنوان مثال، درخواست های خود را بر اساس ماه یا دوره زمانی دیگر بشکنید. در مورد رشته ها، سعی کنید با 10 رشته شروع کنید، هر درخواست یک رشته. توجه داشته باشید، توصیه رشته دارای معاوضه هایی است و برای همه موقعیت های API مفید نیست. اگر تعداد درخواست ها خیلی زیاد شود، خطاهای سهمیه ای رخ می دهد.
برای همه خطاهایی که مبتنی بر زمان هستند (حداکثر N چیز برای X ثانیه در هر رشته)، به خصوص خطاهای کد وضعیت 503، توصیه می کنیم کد شما استثنا را بگیرد و با استفاده از یک الگوریتم عقب نشینی نمایی ، قبل از امتحان مجدد خطای ناموفق، کمی تأخیر صبر کنید. زنگ زدن. یک مثال API تنظیمات ایمیل برای یک رشته این است که 5 ثانیه صبر کنید و تماس ناموفق را دوباره امتحان کنید. اگر درخواست موفقیت آمیز بود، این الگو را برای رشته های دیگر تکرار کنید. اگر درخواست دوم موفقیت آمیز نبود، برنامه شما باید تعداد دفعات درخواست را کاهش دهد تا زمانی که تماس موفقیت آمیز باشد. به عنوان مثال، 5 ثانیه تاخیر اولیه را به 10 ثانیه افزایش دهید و دوباره تماس ناموفق خود را دوباره امتحان کنید. همچنین، در مورد محدودیت تلاش مجدد تصمیم بگیرید. به عنوان مثال، قبل از اینکه برنامه شما خطایی را به کاربر بازگرداند، یک درخواست را 5 تا 7 بار با زمانهای تاخیر متفاوت امتحان کنید.
دسته بندی های سهمیه API | سهمیه ها |
---|
|
نشانه های احراز هویت ClientLogin | 24 ساعت اعتبار دارد. خطای '401 توکن منقضی شده' است. |
تولید کلیدهای عمومی و خصوصی | با ارائه دهنده هویت خود، مجموعه ای از کلیدهای عمومی و خصوصی را با استفاده از الگوریتم های DSA یا RSA ایجاد کنید. کلید عمومی در گواهی فرمت X.509 است. برای اطلاعات بیشتر درباره کلیدهای امضای Single Sign-On مبتنی بر SAML، به ایجاد کلیدها و گواهینامهها برای سرویس Google Workspace Single Sign-On مراجعه کنید. |
لوگو | فایل تصویر لوگوی یک حساب کاربری می تواند در قالب JPEG، PNG یا GIF باشد. اندازه پیشنهادی 143 در 59 پیکسل است و فایل باید کوچکتر از 20 کیلوبایت باشد. هنگام استفاده از نشانوارههای سفارشی، به یاد داشته باشید که از شرایط خدمات Google استفاده نکنید. و از استفاده از لوگوی گوگل، لوگوی جیمیل یا هر لوگوی دیگر گوگل خودداری کنید. برای اطلاعات بیشتر، آرم و خطمشیهای صفحه فرود را ببینید . |
ssoWhitelist | ssoWhitelist یک آدرس IP ماسک شبکه در قالب مسیریابی بین دامنهای بدون کلاس (CIDR) است. |
انواع دیگر محدودیت ها | محدودیت ها و دستورالعمل ها |
---|
|
وضعیت تأیید رکورد MX | وضعیت پیشفرض راستیآزمایی رکورد MX «نادرست» است که به این معنی است که یا سیستم Google اخیراً پیکربندی رکورد MX شما را بررسی نکرده است یا رکوردهای MX شما برای اشاره به سیستمهای Google پیکربندی نشدهاند. اگر سوابق خود را بهروزرسانی کردهاید و وضعیت تأیید نادرست باقی میماند، میتواند به این معنی باشد که بهروزرسانیهای رکورد MX شما منتشر نشده است یا اشتباه تایپی در رکورد وجود دارد. برای انتشار، توصیه می کنیم مدت زمان تعیین شده توسط رکورد MX Time To Live (TTL) صبر کنید و دوباره امتحان کنید. |
کدهای کشور | اگر نام سازمان سفارشی نشده باشد، پیش فرض نام دامنه اصلی شما است. برای اطلاعات در مورد نویسههای نام سازمان، استفاده از نویسه را ببینید. |
ویژگی creationTime ، نمایش عددی تاریخ و زمان | ISO 8601 ، نمایش عددی تاریخ و زمان را ببینید. |
برچسب های کدگذاری زبان | برچسبهای زبان RFC 3066 که توسط Google Mail پذیرفته شده است را ببینید. |
نام سازمان | اگر نام سازمان سفارشی نشده باشد، پیش فرض نام دامنه اصلی شما است. برای اطلاعات در مورد نویسههای نام سازمان، استفاده از نویسه را ببینید. |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-03-25 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-03-25 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# Usage limits and quotas\n\nLimits and quotas protect the Google infrastructure from an automated process that uses the Admin Settings API in an inappropriate way. Excessive requests from an API might result from a harmless typo, or may result from an inefficiently designed system that makes needless API calls. Regardless of the cause, blocking traffic from a specific source once it reaches a certain level is necessary for the overall health of the Google Workspace system. It ensures that one developer's actions cannot negatively impact the larger community.\n\nIn the unlikely event that your API request fails, you'll receive an HTTP status code response. A status code of 403 has error information about incorrect input, and an HTTP status code of 503 has error information indicating which API quotas have been exceeded. These responses allow your custom application to detect these errors and take appropriate action.\n\nIf your requests need to be completed in a fixed period of time, send your requests in parallel or use multiple threads in your Java or C# application. For example, break your requests by month or another time period. In the case of threads, try starting with 10 threads, one thread per request. Note, the thread recommendation has tradeoffs and is not useful for all API situations. If the number of requests gets too high, quota errors will occur.\n\nFor all errors that are time based (maximum of N things for X seconds per thread), especially the 503 status code errors, we recommend your code catch the exception and, using an [exponential backoff](http://en.wikipedia.org/wiki/Truncated_binary_exponential_backoff) algorithm, wait for a small delay before retrying the failed call. A Email Settings API example for one thread is to wait 5 seconds and retry the failed call. If the request is successful, repeat this pattern for the other threads. If the second request is not successful, your application should scale back on the frequency of the request until a call is successful. For example, increase the initial 5 second delay to 10 seconds and retry your failed call again. Also, decide on a retry limit. For example retry a request 5 to 7 times with different delay times before your application returns an error to the user.\n\n| API Quota Categories | Quotas |\n|------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ClientLogin authentication tokens | Valid for 24 hours. The error is '401 token expired'. |\n| Generating public and private keys | With your identity provider, generate a set of public and private keys using either the DSA or RSA algorithms. The public key is in X.509 formatted certificate. For more information about SAML-based Single Sign-On signing keys, see [Generating Keys and Certificates for Google Workspace Single Sign-On Service](/google-apps/help/articles/sso-keygen). |\n| Logo | An account's logo image file can be in JPEG, PNG, or GIF format. The recommended size is 143 x 59 pixels and the file should be smaller than 20Kb. When using custom logos, remember to stay within the Google [Terms of Service](//www.google.com/apps/intl/en/terms/standard_terms.html). And refrain from using the Google logo, Gmail logo, or any other Google logos. For more information, see [Logo and landing page policies](https://support.google.com/a/answer/96474). |\n| ssoWhitelist | A ssoWhitelist is a network mask IP address in Classless Inter-Domain Routing [(CIDR)](http://en.wikipedia.org/wiki/CIDR) format. |\n\n| Other Types of Limits | Limitations and Guidelines |\n|-------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| MX record verification status | The default MX record verification status is \\`false\\` which means either the Google system has not recently checked your MX record configuration or your MX records have not been configured to point to the Google systems. If you have updated your records and the verification status remains false, it can mean your MX record updates have not been propagated, or there is a typo in the record. For propagation, we recommend you wait the amount of time defined by the MX record's Time To Live value (TTL) and try again. |\n| Country codes | If the organization name has not been customized, the default is your primary domain name. For information about organization name characters, see [Character usage](https://support.google.com/a/answer/33386). |\n| `creationTime` property, numeric representation of dates and time | See the [ISO 8601](//www.iso.org/iso/support/faqs/faqs_widely_used_standards/widely_used_standards_other/iso8601), Numeric representation of Dates and Time. |\n| Language encoding tags | See the [RFC 3066 language tags](/workspace/admin/email-settings#language_tags) accepted by Google Mail. |\n| Organization name | If the organization name has not been customized, the default is your primary domain name. For information about organization name characters, see [Character usage](https://support.google.com/a/answer/33386). |"]]