API icon indicating copy to clipboard operation
API copied to clipboard

Api Authentication via QueryString?

Open ComputerElite opened this issue 6 months ago • 0 comments

Would it be possible to authenticate on WebSockets by passing an ApiToken via query strings to the websocket url? The current WebSocket api in javascript doesn't allow for setting custom headers (https://stackoverflow.com/a/4361358) and thus making authentication impossible without a proxy.

Example: wss://api.openshock.app/1/hubs/user?OpenShockToken=<token>

ComputerElite avatar Jul 28 '25 09:07 ComputerElite