What is the correct syntax to trigger a realtime event only on my 3 collections for every document? With or without the brackets?
client.subscribe( ['databases.[63446ca755a041305f7f].collections.[66f7fce6002b828c5b50].documents', 'databases.[63446ca755a041305f7f].collections.[667be4de65e1cbaedb43].documents', 'databases.[63446ca755a041305f7f].collections.[667698d85d98f40d9f97].documents', 'files'], response => { // Callback will be executed on changes for documents and all files. console.log("realtime :", response); this.realtimePayload = response.payload; });
see - https://appwrite.io/docs/apis/realtime for examples
and here's the correct channel formats - https://appwrite.io/docs/apis/realtime#channels
also you dont need brackets [].
should be just -
databases.databaseID.collections.collectionID.documents
where databaseID & collectionID are the actual IDs.
thank you very much 🙏
Recommended threads
- Hi Appwrite Support Team,My project has ...
Details: Project ID: 69a69f6f00113ed0e8e4 Region: SFO (sfo.cloud.appwrite.io) Error Response: Affected: ALL endpoints — Functions, Databases, Storage, Health, ...
- Sudden CORS Errors - Domain hasn't Chang...
I have an Appwrite project with two web apps configured, the first one has the hostname `*` and the second one I just added to test if it could fix the issue wi...
- Any way to temporarily bypass the email ...
Hey guys, any way to bypass the email verification to use the accounts again? i need to recover some projects that due to recent changes have been stopped, and ...