Trello API not working or I just don't know how to get it to work

Alright so quick n simple, I’m trying to see if I can make a gui whitelist by using trello but it seems like I cannot even get the player itself,

If you have trello API knowledge, please help me out.

Code:

local API = require(game.ServerScriptService:WaitForChild("TrelloAPI"))
local BoardID = API:GetBoardID("GUI Whitelist")

game.Players.PlayerAdded:Connect(function(player)
	
	local WhitelistID = API:GetListID("Whitelist", BoardID)
	local WhitelistCards = API:GetCardsInList(WhitelistID)
	
	for i, card in pairs(WhitelistCards) do

		if card.Name == player.UserId then

			print("Found player")
			print("Found player")
			print("Found player")
			print("Found player")
			print("Found player")


		end

	end
	
end)

Why isn’t API:GetBoardID() a number, but “GUI Whitelist”? Or are you hiding it?

1 Like

Well I was watching a tutorial video, I had no volume so I expected it to be the board name, I could try using the actual numbers, i’ll reply back if it worked or not.

No I was right, it’s supposed to be the name only, because if you use the numbers the API is putting out an error saying “… not found!”, earlier when I used the example script to print out the board lists with the board name being the “GetBoardId” it worked, the problem is the code I just sent, it cannot find the card while I added it onto it

Oh, right - didn’t use that module before. Are there any other errors in the output?

1 Like

Nope, it’s clear, tried to look up some youtube tutorials but they all failed me, HTTPS request is on, token connected, key connected all of that i’ve watched whole videos but apparently it doesn’t work for me

Alright, another way of getting the boardId is through .json. You could remove the line

local BoardID = API:GetBoardID("GUI Whitelist")

and then:

  • go to your Trello board,
  • click on a card (make one if you haven’t already),
  • on the link address, add .json at the end,
  • CTRL+F and search for idBoard,
  • copy the value on the right of it (after the colon).

Once the id is clipped, paste it in

local WhitelistID = API:GetListID("Whitelist", --[[here]])

Let me know if that worked.

1 Like

Can you explain the .json part in easy words, I can’t comprehend what you just wrote

On the link address, like this,

https://example.com/t

add .json at the end, so:

https://example.com/t.json

then hit enter.

I did it at the end and it just gives me a red thing meaning I can’t hit enter because something’s wrong

Did you click on a card, then add .json after the entire link address?

Yeah, it’s my user id at the end so I don’t thing .json will work out

I mean in an actual trello card.

What do you mean, the trello card name?

yeah i’m on the page, what am i supposed to do now

You’d need to continue following the steps:

I put the idboard next to the gui whitelist as a string and still nothing

Does it print when the player has been added?

It used to before, but now it’s stuck at the beginning variables for some reason

Probably because of

local API = require(game.ServerScriptService:WaitForChild("TrelloAPI"))
local BoardID = API:GetBoardID("GUI Whitelist")

and since you’re yielding to :WaitForChild(), it’ll ignore the first player added.