Websocket issue with access token

I am trying to use WebSocket v3 to get index data but getting the below error:

{"level":"ERROR","location":"[exception:108] fyers_logger","message":"object of type 'NoneType' has no len()","timestamp":"2024-03-05 08:27:01,903+0530","service":"FyersDataSocket","exception":"Traceback (most recent call last):\n  File \"D:\\jeethesh\\Softwares\\Python\\lib\\site-packages\\fyers_apiv3\\FyersWebsocket\\data_ws.py\", line 308, in __access_token_msg\n    buffer_size = 18 + len(self.__hsm_token) + len(self.source)\nTypeError: object of type 'NoneType' has no len()","exception_name":"TypeError"}

I am passing the correct token as the same token is working for other APIs with the format of "AppId:AccessToken"

I am using the same code shared in the Fyers v3 document as shown below:

API - FYERS

Please help me resolve the issue.

1 reply