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

Why is this Http request unauthorized?

#What the problem is I've been trying to make a feedback system where when you press a button it sends the information to trello and I can read their feedback there. The problem is that it says unauthorized access...


I have 2 scripts a local and a server sided. The local is inside the gui and the server script handles all the http business. ####Local Script

local Http = game:GetService("HttpService")
local plyr = game:GetService("Players").LocalPlayer

script.Parent.MouseButton1Click:connect(function()
	workspace.Game.HTTP:FireServer(script.Parent.Parent.Title.Text,script.Parent.Parent.Box)
end)--title will be the card's name and box will be the card desc

####Server Script

local Http = game:GetService("HttpService")
local keytoken = [HIDDEN]

script.HTTP.OnServerEvent:connect(function(plyr,nom,desc)
	Http:JSONDecode(Http:PostAsync("https://api.trello.com/1/cards"..keytoken,Http:JSONEncode({name = nom, desc = tostring(desc)..[[

Submitted By: ]]..plyr.Name.."; UserId: "..plyr.UserId..";Private Message Link: https://www.roblox.com/messages/compose?recipientId="..plyr.UserId,
	idList=[List ID Hidden], urlSource = nil, due = nil})))
end)

I've never really worked with Http service all that much before so I'm pretty sure I messed up somehow.



Thanks!

2 comments

0

I hid some of the information. So everything is working except that it's unauthorized.

0

Dragon there's a fully working API I would take a look at, myself Im not so good with Trello. But I can tell you I have messed with HTTP quite a lot (I use my own website) but if your access is NOT unauthorised its prob from Trello itself. On Trello make sure your sharing is enabled and your API status is enabled for the post. Best of luck!

1 answer

In your inspector have you made sure HttpEnabled is checked?

You could try this in your script to 100% be sure that it is.

Sample

Http.HttpEnabled = true  --Uses your http variable so insert it after the variable.--

2 comments

0

That's not the problem, it just isn't authorized.

0

That sounds like a host problem instead. I am new to http services.

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