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

Getting the following errors with Trello?

Below is the code I'm using, the actual "Trello Key" has been removed since it is a private key. The rest of the code is intact. Following the code is the exact "output" I received which contains the error which has stumped me. "07:23:47.557 - Key name is too long"

local Encode = LoadLibrary("RBXUtility").EncodeJSON
local DataStore = game:GetService("DataStoreService"):GetDataStore("Applications")
local DataToSend = {}

function Send()
    DataToSend["Name"] = game.StarterGui.ScreenGui.TextBox.Text

    local JSON = Encode(DataToSend)
    DataStore:UpdateAsync("https://api.trello.com/1/board/PRIVATETRELLOKEY",function(Old)
        local New = Old or {}
        table.insert(New,JSON)
        return New
    end)

    print("Sent")
end

script.Parent.MouseButton1Down:connect(Send)

Errors/Output: 07:23:47.556 - RbxUtility.EncodeJSON is deprecated, please use Game:GetService('HttpService'):JSONEncode() instead. 07:23:47.557 - Key name is too long 07:23:47.558 - Script 'Players.Player.PlayerGui.ScreenGui.TextButton.Trello', Line 9 07:23:47.558 - Stack End 07:23:47.559 - Disconnected event because of exception

1 answer

✓ Accepted answer

DataStore keys can only be 50 characters. Your key (when you add the private trello key) is longer than 50 characters.

Why are you using DataStore? It doesn't send HTTP requests. You should be using HttpService if you want to send requests to the Trello website.

1 comment

0

Thanks!

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