Upstox api error websocket v3 please help me

[Running] python -u “c:\Users\Administrator\Desktop\upstox-2\5 candle formetion.py”

Subscribing to instruments: [‘NSE_EQ|INE382Z01011’]

:warning: Error: Handshake status 401 Unauthorized -±± {‘date’: ‘Wed, 15 Oct 2025 05:21:27 GMT’, ‘content-type’: ‘application/json’, ‘transfer-encoding’: ‘chunked’, ‘connection’: ‘keep-alive’, ‘reqid’: ‘005ad03b-db5b-4258-95be-9d1babbf7777’, ‘x-content-type-options’: ‘nosniff’, ‘x-xss-protection’: ‘0’, ‘pragma’: ‘no-cache’, ‘strict-transport-security’: ‘max-age=0; includeSubDomains’, ‘x-frame-options’: ‘DENY’, ‘cache-control’: ‘must-revalidate,no-cache,no-store’, ‘vary’: ‘Access-Control-Request-Headers’, ‘message’: ‘request failed’, ‘cf-cache-status’: ‘DYNAMIC’, ‘set-cookie’: ‘__cf_bm=Y1OSiHQY2BmkHhoPPwqAmZwScDMqKjrGo3Gi2ttozTo-1760505687-1.0.1.1-OM.rkTHXz122fxqDT92Yn_pWPRk7BYKH8aQ_kpcDkDhgoKJoxEhm0V8BfkASli_J; path=/; expires=Wed, 15-Oct-25 05:51:27 GMT; domain=.upstox.com; HttpOnly; Secure; _cfuvid=k1VAFs4lg4Bf.R2UAGEeRqA1Pf.xpjFDg3YdfxLPdPQ-1760505687259-0.0.1.1-604800000; path=/; domain=.upstox.com; HttpOnly; Secure; SameSite=None’, ‘server’: ‘cloudflare’, ‘cf-ray’: ‘98ecdf8139a20e54-BOM’, ‘alt-svc’: ‘h3=“:443”; ma=86400’} -±± None

:cross_mark: Connection Closed | Code: None, Reason: None

As your error message indicates, you are receiving a 401 Unauthorized error, which means you are using an invalid or expired access token.
Please regenerate your access token and refer to the streamer function documentation for connecting to the websocket:

Thanks!