Trust check failed

I’m trying to read chat from twitch with the IRC, I have got an example with python but if I attempt to do this in Roblox it says " Trust check failed"


I have looked around dev forum but all of the trust check failed is for Roblox (which I can see)

# example python
server = ''
nickname = "Test"
port = 6667
token = 'privatel'
channel = '#kitboga'
import socket
import time

sock = socket.socket()
sock.connect((server, port))
sock.send(f"PASS {token}\n".encode('utf-8'))
sock.send(f"NICK {nickname}\n".encode('utf-8'))
sock.send(f"JOIN {channel}\n".encode('utf-8'))
resp = sock.recv(2048).decode('utf-8')
resp2 = sock.recv(2048).decode('utf-8')


-- example lua
local HttpService = game:GetService("HttpService")
local server = ""
local nickname = "Test" .. game.JobId
local token = "Private"
local channel = "#kitboga"

local pass = HttpService:PostAsync(server, "PASS " .. tostring(token) .. "\n", Enum.HttpContentType.ApplicationUrlEncoded, false)

I most likely have done something terribly wrong but i do not know what i have done wrong/how to fix any help will be appreciated!
If you want to run the scripts you need to generate a token/OAuth you can do that here:
(replace “Private” in token with the OAuth that was generated)

Are you sure you are able to use HTTP with the service? The Python example interacts directly with the socket, while the Lua one uses HttpService which expects HTTP headers to be sent and received.

no, I am not sure, I have not seen anyone do this before so I just wrote the code to test which is not working.
From quickly searching I have found two threads
and it appears web sockets don’t exist in Roblox HTTP (which I believe I need to use)
Edit: it appears the IRC can only work from a socket/websocket

That’s correct. This service clearly requires websockets to work, but Roblox does not support them and iirc it’s not planned.

Chats services (including Discord) generally base on websockets, because it’s easy to create a channel of communication (instead of HTTP long polling). The only one solution is building a web api (proxy) for example in python or node.js. You could do it on glitch (make websocket there and create express server to communicate with your game) and then use HttpService to glitch on Roblox.


Trust checks fail when you don’t have http:// or https:// at the front of a link.
There also currently isn’t a way to hook to sockets without making or using a module which would need to be made and go through a third part website.