Hi! I’m trying to make a pastebin post through a script. I’m getting error 422. I’m new to http with pastebin. Can someone tell me what I did wrong? Thanks!
for _ = 1,5,1 do
s,e = pcall(function()
local binParams =
"api_option=show_paste"..
"&api_dev_key="..urlEncode(module.Settings.PasteBin.Token)..
"&api_user_name="..urlEncode(module.Settings.PasteBin.User)..
"&api_user_password="..urlEncode(module.Settings.PasteBin.Pass)..
"&api_paste_name="..--[[tostring(game.JobId)..]]"Test"..
"&api_paste_private="..tostring(module.Settings.PasteBin.PrivacySetting)..
"&api_paste_code="..str
local result = http:PostAsync(module.Settings.PasteBin.Target,http:JSONEncode(binParams))
local target = module.Settings.Discord.BaseUrl..module.Settings.Discord.ProxyProvider..module.Settings.Discord.Token
local toEncode = {
["content"] = result
}
http:PostAsync(target,http:JSONEncode(toEncode))
end)
if s then break else warn(e) end
end