Hello,
I am trying to integrate a Java Spring boot application with the Auth0 Java SDK for the Management API. v 2.18.0
From what I can tell, I am successfully getting my api token (with appropriate scope credentials) and creating a Management API instance, but when I try to use the management api client I keep getting Auth0Exceptions - “Failed to execute request”
The stack trace shows: at com.auth0.net.RateLimitInterceptor.intercept(RateLimitInterceptor.java:88) ~[auth0-2.18.0.jar:na]
This is occurring so far on create organizations (POST /api/v2/organizations) and also update user (PUT /api/v2/users/{id}) and when I try the same requests (same domain, token, and params/body) via curl commands or by building the query through a basic http call in my application they work just fine.
Haven’t been able to find any other posts or issues around this, so feel like I’m probably doing something wrong in the way I am instantiating the Management API client, but I can’t figure out what that would be.
Including some code would probably also help.
After setting our auth0domain and auth0token, this is how I’m instantiation the mgmt api client: managementAPI = ManagementAPI.newBuilder(auth0Domain, auth0Token).build();
The error that you are receiving indicates that the request that you are trying to make exceeds the global rate limit, which results in an Error 429. This is also indicated by the package documentation:
An OkHttp Interceptor responsible for retrying rate-limit errors (429) using a configurable maximum number of retries, and an exponential backoff on retry attempts.
Usually, the request limit would be around 1000 per minute with 2 requests per second (up to burts of 10 requests). If these limits are exceeded, you would receive a Global Rate Limit Error 429.
If you have any other questions, feel free to let me know!
Hey @nik.baleca , thanks so much for the reply.
I don’t think its possible I am hitting the 1000per min rate limit since we have not actually started using this integration in production yet. Is it possible our global rate limit has been set lower than that? Is there a way that I can check?
I also am successful sending the same API call via curl (same token). Would that not also be subject to the global rate limit?