I've been here trying to send a message with luasocket and it had some problems, being 403: Token Validation Failed
and 401: Authorization has been denied for this request.
local socket = require'socket.http'
local json = require'json'
print(os.date('at %c'..', the program starts.'))
-- bottom part is similar to http://lua-users.org/lists/lua-l/2008-07/msg00206.html (not secure)
local result,code,headers,stats = socket.request(
{
method = 'POST',
url = 'https://privatemessages.roblox.com/v1/messages/send',
headers = ({
["Cookie"] =".ROBLOSECURITY=not-showing-to-you",
["content-length"]= 10 -- I have no idea how this thing works
}
}
)
print(json.encode(result))
print(code)
print(stats)
print(json.encode(headers))
EDIT
I just gave up a few days after learning that its quite complicated without a wrapper thing idk.