Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Problems with Trello PostAsync ?

When I run this:

game:GetService("HttpService"):PostAsync("https://api.trello.com/1/cards/?key=Imnotgivingyoumykeyasanexample&token=Imnotgivingyoumytokenasanexample", "Hello Example")

It just errors this:

HTTP 400 (HTTP/1.1 400 Bad Request)

And when I go to the actual website

Cannot GET /1/cards/?key=Imnotgivingyoumykeyasanexample&token=Imnotgivingyoumytokenasanexample

I did the key and token thing by going to https://trello.com/app-key and clicking the authorize token and accepting it. I did replace the key and token in my PostAsync request and I didn't leave it as "Imnotgivingyoumykeyasanexample". Help!

1 answer

✓ Accepted answer

It's trying to look for a list. Also make sure HTTPEnabled is on.

Run; game.HTTPService.HTTPEnabled = true

I just finished up with PostAsync. Feel free to look at mine.

local Trello = "no"
local Key = "no"
local Token = "no"
local http = game:GetService("HttpService")
local get = http:GetAsync('https://api.trello.com/1/boards/'..Trello..'/lists?key='..Key..'&token='..Token,true)
local tab=http:JSONDecode(get)

for _,v in pairs(tab) do
	if v.name:match('^Banlist%s?$') then
		boardid = v.id
	end
end

game.ReplicatedStorage.bannary.OnServerEvent:Connect(function(player, bann, banner, reason)
	local pla = game.Players:WaitForChild(bann)
	pla:Kick("Permanently Banned: " .. reason)
    local musget = http:PostAsync('https://api.trello.com/1/cards/?key='..(Key)..'&token='..(Token), http:JSONEncode({["name"]=(pla.Name .. " | " .. pla.userId), ["desc"]=("Reason: " .. reason .. "\nBanned by: " .. banner.Name), ["due"]=nil,["idList"]=boardid,["urlSource"]=nil}))
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.