Global rate limit reached

How to prevent reaching the Global rate limit when inviting users/creating users (auth0 management api create user) ?

Hi @ralmoite

Welcome to the Auth0 Community!

Can you share more details regarding the user creation process? Depending on the subscription level, your rate limits can differ. Check this doc file → Rate Limit Configurations

Thanks
Dawid

@dawid.matuszczyk

this is what I did. First there is an input of 10 emails in the client side (app) then we call our invite user api. Inside this invite user api it uses the Managementclient from “auth0”

  1. We check the emails if they already exist or not using the userByEmail.getByEmail.
  2. then we filter the emails thats not in the auth0 database.
  3. Map the emails and use the users.create from the Managementclient

between the mapping of array of emails I use a delay of 5 seconds.

also the Global rate limit is still appearing for from 6 hours ago to now

Hi @ralmoite

Thank you for the explanation. Assuming you have a user database, did you consider using lazy migration → Import and Export Users or Bulk user import → Import and Export Users and Auth0 Management API v2?

In terms of your process, your rate limit for your subscription level, if I’m not mistaken, is 2req/s. While creating a user, you can get a 409 response message, meaning the user already exists. Did you try to skip checking if email exists in the auth0 database and move straight to the user creation while catching the 409 error code? In the best-way scenario, you’ll reduce the number of requests by 10 per batch; in the worst-case scenario, you will have the same number of requests per batch. I hope this can help you!

Dawid

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.