ขีดจำกัดและโควต้าการใช้งาน
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ขีดจำกัดและโควต้าช่วยปกป้องโครงสร้างพื้นฐานของ Google จากกระบวนการอัตโนมัติ
ที่ใช้ Reseller API ในทางที่ไม่เหมาะสม คำขอที่มากเกินไปจาก API อาจเกิดจากการพิมพ์ผิดที่ไม่มีอันตราย หรืออาจเกิดจากระบบที่ออกแบบมาอย่างไม่มีประสิทธิภาพซึ่งทำให้เกิดการเรียก API ที่ไม่จำเป็น ไม่ว่าสาเหตุจะเป็นอะไร การบล็อกการรับส่งข้อมูลจากแหล่งที่มาหนึ่งๆ เมื่อการรับส่งข้อมูลมีจำนวนถึงระดับหนึ่งเป็นสิ่งจำเป็นต่อสุขภาพโดยรวมของระบบ Google Workspace
ซึ่งจะช่วยให้มั่นใจได้ว่าการกระทำของนักพัฒนาแอปคนหนึ่งจะไม่ส่งผลเสียต่อชุมชนในวงกว้าง
คำขอ API ไม่สำเร็จ
ในกรณีที่คำขอ API ล้มเหลว ซึ่งเกิดขึ้นได้ยาก แอปพลิเคชันจะได้รับการตอบกลับเป็น
รหัสสถานะ HTTP รหัสสถานะ 403
มีข้อมูลข้อผิดพลาดเกี่ยวกับอินพุตที่ไม่ถูกต้อง และรหัสสถานะ HTTP 503
มีข้อมูลข้อผิดพลาดที่ระบุว่าโควต้า API ใดเกิน การตอบกลับเหล่านี้ช่วยให้แอปพลิเคชันที่กำหนดเองตรวจพบข้อผิดพลาดเหล่านี้และดำเนินการอย่างเหมาะสมได้
ข้อผิดพลาดที่อิงตามเวลา
สำหรับข้อผิดพลาดทั้งหมดที่อิงตามเวลา (สูงสุด N รายการเป็นเวลา N วินาทีต่อเธรด) โดยเฉพาะ503
ข้อผิดพลาดรหัสสถานะ เราขอแนะนำให้โค้ดของคุณตรวจหาข้อยกเว้นและใช้อัลกอริทึมการหยุดชั่วคราวแบบทวีคูณเพื่อรอการหน่วงเวลาเล็กน้อยก่อนที่จะลองเรียกใช้ที่ล้มเหลวอีกครั้ง ตัวอย่าง Reseller API สำหรับ 1 เธรด
คือการรอ 5 วินาทีแล้วลองเรียกที่ล้มเหลวอีกครั้ง หากคำขอสำเร็จ
ให้ทำตามรูปแบบนี้ซ้ำสำหรับเธรดอื่นๆ หากคำขอที่ 2 ไม่สำเร็จ แอปพลิเคชันควรลดความถี่ของคำขอลง
จนกว่าการเรียกจะสำเร็จ เช่น เพิ่มการหน่วงเวลาเริ่มต้น 5 วินาที
เป็น 10 วินาที แล้วลองโทรอีกครั้ง นอกจากนี้ ให้กำหนดขีดจำกัดการลองอีกครั้ง
เช่น ลองส่งคำขออีกครั้ง 5-7 ครั้งโดยมีระยะเวลาก่อนที่จะส่งคำขออีกครั้งแตกต่างกัน
ก่อนที่แอปพลิเคชันจะแสดงข้อผิดพลาดแก่ผู้ใช้
จำกัดสูงสุด
หมวดหมู่ขีดจำกัด API |
จำกัดสูงสุด |
การติดตาม purchaseOrderId |
พร็อพเพอร์ตี้นี้รับอักขระข้อความธรรมดาได้สูงสุด 80 ตัว |
การติดตาม maxResults |
maxResults สตริงการค้นหาอาจมีผลลัพธ์ 1-100 รายการ
ค่าเริ่มต้นคือ 20 ผลการค้นหา
|
โทเค็นการโอน (customerAuthToken ) |
โทเค็นการโอนของลูกค้าจะมีอายุ 30 วันหลังจากที่สร้าง
|
จำนวนผู้ใช้สูงสุดสำหรับลูกค้า |
จำนวนผู้ใช้สูงสุดอาจเป็น 50,000 หรือจำนวนสูงสุดที่กำหนดไว้ในสัญญาตัวแทนจำหน่าย
ของคุณ ทั้งนี้ขึ้นอยู่กับสัญญา
ของคุณ
|
คำขอที่ไม่ได้รับอนุญาต |
Google ไม่อนุญาตคำขอที่ไม่ได้รับอนุญาตไปยัง Reseller API
ระบบจะถือว่าคำขอไม่ได้รับอนุญาตหากไม่มีโทเค็นการให้สิทธิ์ ดูข้อมูลเพิ่มเติมได้ที่ดูข้อมูลเกี่ยวกับการตรวจสอบสิทธิ์และการให้สิทธิ์
|
โควต้าประเภทอื่นๆ
โควต้าประเภทอื่นๆ |
ข้อจำกัดและหลักเกณฑ์ |
รูปแบบข้อมูล |
รูปแบบข้อมูลอยู่ใน JavaScript Object Notation
JSON
JSON เป็นรูปแบบอินเทอร์เน็ตทั่วไปที่ให้วิธีการ
แสดงโครงสร้างข้อมูลที่กำหนดเอง JSON เป็น
รูปแบบข้อความที่ไม่ขึ้นอยู่กับภาษาใดๆ แต่ใช้รูปแบบ
ที่คุ้นเคยสำหรับโปรแกรมเมอร์ในตระกูลภาษา C ซึ่งรวมถึง
C, C++, C#, Java, JavaScript, Perl และ Python
|
รูปแบบเวลา |
วันที่และเวลาทั้งหมดอยู่ในตัวแปลง Epoch
ในหน่วยมิลลิวินาที รูปแบบนี้ใช้กับค่าของเวลาสร้างการสมัครใช้บริการ เวลาเริ่มต้นและเวลาสิ้นสุดของสัญญาผูกมัดของแพ็กเกจ และเวลาสิ้นสุดของช่วงทดลองใช้ฟรี 30 วัน
|
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-29 UTC
[null,null,["อัปเดตล่าสุด 2025-08-29 UTC"],[],[],null,["# Usage limits and quotas\n\n\u003cbr /\u003e\n\nLimits and quotas protect the Google infrastructure from an automated process\nthat uses the Reseller API in an inappropriate way. Excessive requests from\nan API might result from a harmless typo, or might result from an inefficiently\ndesigned system that makes needless API calls. Regardless of the cause,\nblocking traffic from a specific source when it reaches a certain level is\nnecessary for the overall health of the Google Workspace system. It ensures that\none developer's actions can not negatively impact the larger community.\n\nAPI request failures\n--------------------\n\nIn the unlikely event that your API request fails, your application receives an\nHTTP status code response. A status code of `403` has error\ninformation about incorrect input and an HTTP status code of `503`\nhas error information indicating which API quotas have been exceeded. These\nresponses let your custom application detect these errors and take appropriate\naction.\n\nTime-based errors\n-----------------\n\nFor all errors that are time based (maximum of N things for N seconds per\nthread), especially the `503` status code errors, we recommend that\nyour code catch the exception and by using\nan\n[exponential backoff](https://en.wikipedia.org/wiki/Exponential_backoff)\nalgorithm, wait for a small delay before retrying the failed call. A\nReseller API example for one thread\nis to wait 5 seconds and retry the failed call. If the request is successful,\nrepeat this pattern for the other threads. If the second request isn't\nsuccessful, your application should scale back on the frequency of the request\nuntil a call is successful. For example, increase the initial 5 second delay\nto 10 seconds and retry your failed call again. Also, decide on a retry limit.\nFor example retry a request 5 to 7 times with different delay times before\nyour application returns an error to the user.\n\nLimits\n------\n\n| API limit categories | Limits |\n|----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Subscription `purchaseOrderId` | This property accepts up to 80 plain text characters. |\n| Subscription `maxResults` | The `maxResults` query string can be 1 - 100 results. The default is 20 results. |\n| Transfer Token (`customerAuthToken`) | A customer's transfer token is valid for 30 days after it's generated. |\n| Maximum number of users for a customer | Depending on your contract, the maximum number of users can either be 50,000 or the maximum defined in your reseller contract. |\n| Unauthorized requests | Google doesn't allow unauthorized requests to the Reseller API. A request is considered unauthorized if no authorization token is provided. For more information, see [Learn about authentication \\& authorization](/workspace/guides/auth-overview). |\n\nOther types of limits\n---------------------\n\n| Other types of limits | Limitations and guidelines |\n|-----------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Data format | The data format is in the JavaScript Object Notation [JSON](https://wikipedia.org/wiki/JSON). \u003cbr /\u003e \u003cbr /\u003e JSON is a common internet format that provides a method of representing arbitrary data structures. JSON is a text format that is completely language-independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, and Python. |\n| Time format | All date times are in the [Epoch converter](https://www.epochconverter.com/) in milliseconds. This format applies to the values for the subscription creation time, a plan's commitment start and end times, and a 30 day free trial's end time. |"]]