Trello API not recognizing my board ID (no errors)

local api = require(game.ServerScriptService.APIs.TrelloAPI)
print("api")

local boardID = api:GetBoardID("Fortress")

print("board")
local listID = api:GetListID("Generals",boardID)
print("variables")

local newCard = api:AddCard("Test","Test123",listID)
print("card")

It only prints “api”

image

My token is in and correct, am I doing something wrong?

API: https://getenveloped.com/trelloapi/

What are you requiring with the variable “api”

I mean variable names really dont matter, I’m using a script dedicated to the API and no other, so it doesn’t really matter.

Yes the variable name doesnt matter I am talking about what are you requiring. Is it a module script? can you show me the function “addBoard” in it so I can debug.

I did send the API earlier, since this isn’t mine and has worked before but it doesn’t work now. I know the function works it’s just something wrong with what I’m doing, I’d check out the API for yourself or repro the issue.

The api documentation does not matter. I am talking about the module script you are requiring in the APIs folder named TrelloAPI. You are trying to call a function from this module script and thats where the problem is if it isnt recieveing a response from the trello api endpoint.

Well this is what it says.

	function T:GetBoardID(name)
			local url
			if Private then
				getAddon()
				url="https://api.trello.com/1/members/me/boards"..addon
			else
				getAddon()
				url="https://api.trello.com/1/members/me/boards"..addon
			end
			local tball=HS:GetAsync(url,true)
			local dt=HS:JSONDecode(tball)
			for _,tab in pairs(dt) do
				for p,it in pairs(tab) do
					if p=="name" and it==name then
						return tab.id
					end
				end
			end
			error(name.." not found!")
			return nil
		end

You need the board id that’s in the URL, not the boards name…lol

No. The function is supposed to retrieve the boards ID by the boards name and your access token.

Show me the get getAddon() function. The api may be outdated. I analyzed the actual trello API and now understand it and can compare it to the request the script is making.

You would need to call the function that uses the token that YOU made as an application for the board, which was/is granted for the board then, which you don’t have included in the code.

Please refer to:

https://developer.atlassian.com/cloud/trello/guides/rest-api/api-introduction/

Not me not having it included. [quote=“vf9r, post:1, topic:1305031”]
My token is in and correct, am I doing something wrong?
[/quote]
and he says here that he has the token in correct.

i have already read the neccasary parts of it The token would be a variable in the module he is calling the functions from.

local api = require(game.ServerScriptService.APIs.TrelloAPI)
print("api")

local boardID = api:GetBoardID("Fortress")

print("board")
local listID = api:GetListID("Generals",boardID)
print("variables")

local newCard = api:AddCard("Test","Test123",listID)
print("card")

Where do you see in this code that uses the “token that you’ve generated”?

You’re using the trello api, when you never called for the token function.

I don’t see a token function, it shows that you get the token manually.

This is what it came with (I organized it into folders)
image

The module handles to loading with tokens etc

where did you get the module so i can download it

i’ve already stated MANY times that the api + download is at the top of the topic (first reply)