Problem with realtime livechat API


Hi everyone,

I have a question about the livechat realtime api. I am connecting with ddp.js from a non-meteor website.

I connect like so:

var ddp = new liveChatDDPClient({
endpoint: 'ws://',
SocketConstructor: WebSocket

It then manages to establish a succesful connection
Subsequently, I make a methodcall like so:

var initData = ddp.method("livechat:getInitialData",[userSessionId]);

and initData returns ‘0’ ?

Any thoughts?

Thanks in advance.


Where is userSessionId coming from?


Its generated randomly