
You can manualy use it by using any server-side WebSocket libraries


What's your use case?

sorry about the delay response i want to be able to listen for document creations on a server

however while the ws connection does say is successful

i do not get any of the events im expecting

i usually get these two messages

Received: '{"type":"connected","data":{"channels":["databases.64be8855815ab10ea802.collections.64be886f3f3564bb2192.documents"],"user":null}}' app.js:48 64 Received: '{"type":"error","data":{"code":0,"message":"array_key_exists(): Argument #2 ($array) must be of type array, int given"}}'

"accept-language": "en-US,en;q=0.9",
"cache-control": "no-cache",
"pragma": "no-cache",
"sec-websocket-extensions": "permessage-deflate; client_max_window_bits",
// "sec-websocket-key": "/oj9X0GI+Sqbh05hLCbqQw==",
"sec-websocket-version": "13"
});```

not sure if i am missing something

i guess i could use a cloud function on this instance and have another messaging api let my server know about the creation

but that just seems like alot of work

nvm the second error was because i was sending data to the server from the client

oh theres a whole auth process that needs to. be done once connected passing the session back to the server to be able to receive the events

hmmm now this has become some work

so typically, servers are able to have an endpoint listening for http requests. can you do that?

sorry dont have much experience with backend

what are you doing for your server? what do you have set up?

like have a cloudfunction call my http endpoint

right now i just have basic express server

but i think you are telling me define a route and call that route

which makes sense now that i think about it

yes, exactly. you can use Appwrite Webhooks https://appwrite.io/docs/webhooks. The webhook can be configured to make a POST request to your express server with the data just like the realtime payload.
This is why it's typically not needed to have realtime in the server SDK

ohhhh thats awesome

makes sense
Recommended threads
- I am facing this error: type 'Null' is ...
When attempting to fetch areas from the area collection, the application throws an error: "type 'Null' is not a subtype of type 'int.'" This issue originates in...
- Adding Domain to Sites [Self Hosted]
I am struggling to get this working. I stood-up a new server and deployed appwrite 1.7.4. I added update .env file _APP_DOMAIN=appwrite.mydomain.com _APP_DOMAI...
- Need help migrating from self hosted to ...
Hi! I am using self hosted appwrite for testing stuff out and now it's prod ready I want to deplot it to the cloud version. It gave me this error when fetchin...
