In situations where you don't have the user credentials but you can send authenticated requests to nextcloud(such as when you have authenticated cookies)
you can use "pre-authenticated tokens" instead of the username and password.
- Get the `pre_auth` endpoint from the ocs capabilities request
- Send an authenticated request to the endpoint, a token will be returned.
- Open the websocket as normal
- Send an empty string as username over the websocket
- Send the token from the `pre_auth` request as passwor
## Sending custom events
You can send custom events from a nextcloud app using the methods provided by `OCA\NotifyPush\IQueue`.