Message (GET)
Description
This endpoint can be used by clients to receive dialog events. When sending a request to this endpoint, the connection stays open, and the client can listen for events from the server.
The server may send the following events:
- clientRegistered
This event is sent to the client right after the connection has been established and the client connection is registered by the server. When receiving this event, the client should request the Dialog unread messages endpoint to ensure that all unread messages are downloaded from Melde. - newDialog
This event is sent to the client when a new dialog is created. The case worker side will currently never receive this event type, since it is only the case worker side who is allowed to create new dialogs. - newMessage
This event is sent to the client when new message(s) are ready to be downloaded. The client should then request the Fetch new messages endpoint to download the message(s). - dialogDeleted
This event is sent to the client when a dialog is deleted. Melde is allowed to store messages for 4 months after the newest dialog message timestamp in a dialog, due to privacy policy. - readMessages
This event is sent to the client when the message recipient has read a message.
Endpoint
Scope
nhn:melde/dialog/melding
Example client
An example client can be found in the Example.Dialog folder in this Github repository (opens in new tab).