You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, is there any way to pass in JWT token as url query string parameter during reconnection happen? As time to time the client might have disconnected and JWT token will be expired, so I need to pass in a new token when reconnection happen.
The text was updated successfully, but these errors were encountered:
I have the exact same scenario: The 3rd-party system I connect to mandates that I include a token on the querystring and this token expires at regular intervals. Therefore, I must obtain a new token and change the URL from time to time. Fortunately, I can achieve this with the websocket-client client factory like so:
varclientFactory=newFunc<Uri,CancellationToken,Task<WebSocket>>(async(uri,cancellationToken)=>{// The current value in the uri parameter must be ignored because it contains "access_token" which may or may not be expired.// The following line ensures the "access_token" is refreshed whenever it expires.uri=newUri($"wss://ws.zoom.us/ws?subscriptionId={_subscriptionId}&access_token={_tokenHandler.Token}");varclient=newClientWebSocket(){Options={KeepAliveInterval=TimeSpan.Zero,// Turn off built-in "Keep Alive" feature because Zoom uses proprietary "heartbeat" every 30 seconds rather than standard "pong" messages at regular interval.}};client.Options.SetRequestHeader("ZoomNet-Version",ZoomClient.Version);awaitclient.ConnectAsync(uri,cancellationToken).ConfigureAwait(false);returnclient;});// Please note that the url specified on the following line will be ignored and will be replaced with the URI calculated in the client factoryvarmyWebsocketClient=newWebsocketClient(newUri("wss://ws.zoom.us"),clientFactory);
Hi, is there any way to pass in JWT token as url query string parameter during reconnection happen? As time to time the client might have disconnected and JWT token will be expired, so I need to pass in a new token when reconnection happen.
The text was updated successfully, but these errors were encountered: