Using stream - websocket - error 403 handshake
- Dominant language
- Go
- Stars
- 15.9k
- Forks
- 873
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 6
Description
**Have you read the documentation?**
- [*] Yes, but it does not include related information regarding my question.
- [ ] Yes, but the steps described in the documentation do not work on my machine.
- [ ] Yes, but I am having difficulty understanding it and wants clarification.
**You are setting up gotify in**
- [ ] Docker
- [ ] Linux native platform
- [*] Windows native platform
**Describe your problem**
Hi, I'm trying to fetch messages through the stream websocket and I always get a 403 handshake error. I've tried every token available and can't find a solution.
`
var socket = new WebSocket('ws://localhost/stream?token=xxxxxxxxx');
socket.onerror = function() {
console.log()
};
socket.onopen = function() {
// alert('handshake successfully established. May send data now...');
socket.send("Hi there from browser.");
};
socket.onmessage = function (evt) {
//alert("About to receive data");
var received_msg = evt.data;
alert("Message received = "+received_msg);
};
socket.onclose = function() {
alert('connection closed');
};
`
What am I doing wrong? Even though the demand for extra documentation was declined in another issue, I'd love to see more than the swagger file.
Contributor guide
Assessment
This issue has not been assessed yet.