DiscourseApi::TooManyRequests rate limit?

I’m running requests via the API and i don’t want any kind of rate limiting.

I have already changed the app.yml to include
DISCOURSE_MAX_ADMIN_API_REQS_PER_MINUTE: 1000

However the error i’m getting back is to do with rate limiting per 10 secs

Error code: ip_10_secs_limit

I can see

DISCOURSE_MAX_REQS_PER_IP_PER_10_SECONDS

But this is not an admin API limit and i’d prefer to keep that

Is there an admin per_10_seconds limit hiding somewhere that i can’t see?

1 Like

That’s your issue then. You’re setting max admin requests to 10000, and then you’re not making an admin request.

Unless I’m misunderstanding something

but i am though

I’m using the Discourse API Ruby Gem

client.sync_sso(
      sso_secret: ENV['DISCOURSE_SSO_SECRET'],
      name: safe_username,
      username: safe_username,
      email: user.email,
      avatar_url: user.avatar.url(:thumb),
      avatar_force_update: true,
      external_id: user.id
    )
def client(username: "Admin_Username")
    DiscourseApi::Client.new(Rails.application.secrets.forums_hostname).tap do |discourse_client|
      discourse_client.api_key = ENV["DISCOURSE_API_KEY"]
      discourse_client.api_username = username
    end
  end