How to reconnect a websocket when it is disconnected after a long time?

I have implemented a websocket connection for receiving some data. However, It is disconnected after a day, which I think is a stable connection and usual manner of websocket according to this link. What should I do after disconnection? Do I need a new authorization to reconnect the websocket again without any problem? Because when I try to reconnect the websocket every 5 seconds (if it is not achieved), I receive the 429 error code. It means that the websocket is not reconnected at all after disconnection. Do I need to wait after a disconnection? I have also another question that may be related to this topic. Do I need to implement ping/pong protocol for the websocket connection in addition to heartbeats?

After you are disconnected, it is likely that the access token that you have is also expired. A sure-fire way to make your WebSocket work again is to acquire a new access token and authorize a new WebSocket connection to whatever API data source you’re looking at (market data, standard real-time, market replay).