0

I am working on AdminSdk when I am trying to fetch the user from AdminSdk I got

<HTML>
<HEAD>
<TITLE>User Rate Limit Exceeded</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>User Rate Limit Exceeded</H1>
<H2>Error 403</H2>
</BODY>
</HTML>

I am fetching every Time only 400 Users but In my domain I have 5000 Users How can i solve this any one help me and please check my Quota limit below

I am Using java to fetch the Users

user2893081
  • 1
  • 1
  • 2
  • 4

1 Answers1

0

https://developers.google.com/admin-sdk/directory/v1/limits

The API returns:

Chrome and mobile devices – A default and a maximum of 100 entries per page.

Groups and group members – A default and maximum of 200 entries per page.

Users – A default of 100 entries and a maximum of 500 entries per page.

The user alias and organization unit resources do not use response pagination. All user primary emails are returned in alphabetical order and the response order is case insensitive.

According to the limit here, you can get maxResults query string for 100 users by default and 500 as the absolute maximum. I believe anything above 500, you will get an error. The best way to do it is to retrieve 500 entries at a time. If you detect a pageToken in the response, keep retrieving the entries by using the token until you finished retrieving all users.

There is no way to just get all 5000 users at once if that's what you are looking for...

Emily
  • 1,464
  • 1
  • 9
  • 12
  • Hi @Emily Lam Why is the main reason? Why is not allowed to get over 500 users? Thanks in advance :) – Orlando Herrera Feb 19 '14 at 19:15
  • 1
    I am not the designer of this API, so I will quote what the doc said "Limits and quotas protect the Google infrastructure from an automated process that uses the Directory 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 Apps system. It ensures that one developer's actions cannot negatively impact the larger community." – Emily Feb 19 '14 at 21:35