Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Trello API Not working, what did I do wrong? [Fixed it, forget this]

Asked by 9 years ago

This is my code:

local Settings = {
    ["BoardID"] = "lzo0Wdwm",
    ["ListID"] = "552b0f4bb5c6a94cd0ef1500",
    ["URL"] = "https://api.trello.com/1/cards",
    ["Addon"] = "`--`",
    ["Token"] = "`--`",
}
local HS = game:GetService("HttpService")


game.Players.PlayerAdded:connect(function(Player)
    local Url
    local Information = {
        name = Player.Name,
        desc = "Player Joined",
        idList = Settings.ListID,
        urlSource = "null",
        pos = math.huge,
        due = "null",
    }
    local InfoJSON = HS:JSONEncode(Information)
    Url = Settings.URL
    HS:PostAsync(Url,InfoJSON)
end)

I've never tried it before, but here is the error I am getting:

21:05:21 -- HTTP 400 (Bad Request)

2 answers

Log in to vote
0
Answered by 8 years ago

you have to use a Key and a Token so it would be like this: ~~~~~~~~~~~~~~~~~

["Key"] = "", --https://trello.com/app-key
    ["Token"]="",--https://trello.com/1/authorize?key=PUTAPPKEYHERE&name=My+Application&expiration=never&response_type=token&scope=read,write

~~~~~~~~~~~~~~~~~

Ad
Log in to vote
-1
Answered by 9 years ago

You could actually use the api i made and "null " is not how you set it you set it to nil also the pos variable cant be a number it has to be a string like "top", or "bottom". Please rep me up if you like the answer

Answer this question