"Number of requests exceeded limit"

Before you say “this has been covered in another topic” don’t.
All other topics regarding this don’t help me.
I have got a trello based name system which. when a character joins, loops through all the cards on a certain trello list looking for a player’s name. There are a lot of cards 100+. This works fine on my testing game but when I move it onto my real game (this game has trello configured admin) it fails to work and displays the warning “Number of requests exceeded limit”. Any help would be greatly appreciated.

1 Like

How many requests are you making per minute, Roblox has a 500 per minute request limit and I would imagine Trello would have one on their end as well.

Trello has a limit of 100 requests in 10 seconds.

I’m not sure, how do I check?
30chars

Hmm odd. I’m currently working on a Trello related project, and I still get the errors from studio. The errors for me just mean that I can’t exceed the limit of 30 requests per 10 seconds.

This may be your case. Trello only allows 30 requests to be sent from roblox to trello in just 10 seconds. No more than that. It is frustrating, and I’ve already done some research and it doesn’t look like they are changing it any higher any time soon. I think it’s best to change to a different platform to store information on.

I think your issue may be with hitting HTTP requests with Trello. Could i see the script that sends the requests? Make sure to remove your token!!!

		local function getHonours(player)
	local json = hs:GetAsync("https://api.trello.com/1/boards/)
	local tbl = hs:JSONDecode(json)
	
		for i,v in pairs(tbl) do
		if v.name == "SpecialTags" then
			local li =  hs:GetAsync('https://api.trello.com/1/lists/'..v.id..'/cards/)
			local dec = hs:JSONDecode(li)
			for j,k in pairs(dec) do
				wait(0.1)
				local Splitter = string.split(k.name, ":")
				if Splitter[1] == player.Name then
					return k.desc
				end	
			end
		end
	end
end

ive removed the urls for the trello boards but they work perfectly fine, the issue is not with the links

You could take the whole list, store it in a table in roblox and loop through it?

no because having it on trello means people can edit it who arent developers (trusted members but not trusted enough for game access)

Scrap what I said about request limits since I presume you are just sending one request when the server starts? If you could help explain how frequently are you updating your table that may help.

No, what I meant is getting all cards on the trello, storing it in a table and loop through it.

I am updating it whenever a character spawns (characteradded function)

Well now that I’m seeing the 2nd for loop you probably are firing this request way to often. You will need to modify your script to not use a for loop if possible.

Instead of doing for i,v in pairs(), try just looking straight for the player’s card. Don’t check all cards to find it. Cause if you have over 100 cards inside your Trello list, then it WILL exceed the limit.

The only problem is that it will give you an error if it can’t find the card, so you’ll probably want to use

pcall(function()

 end)

Try doing a loop that checks if an error occurs, if no error occurs, then you can break the loop and skip on to the next lines.

how could i achieve this?
sorry but I am not a professional scripter, my group’s scripter is on holiday so im doing some of the stuff, as you can see I am a builder, not a programmer

It wouldn’t be the easiest thing to fix the root issue without proficient understanding of the full script. Since the end issue is that you are flooding Trello with HTTP Requests. I would suggest you just disable this script so that Trello doesn’t invalidate your token until your programmer can come back and rewrite the script.

Instead of doing for i,v in pairs(tbl) do, you can just do tbl.SpecialTags

how could i achieve this?

This is what I would do:

local Continue = false

repeat wait(1)
  pcall(function() --This makes it so if a line inside it breaks the whole script won't stop.
    --Here should be the lines that may break when not being able to find the specific card.
    Continue = true --Keep this line at the end.
  end)
until Continue  == true

ive dmed you on discord, respond when you can