I want to know How to connect to solace API continuedly, because after about 5 min if we don't send and receive any message we should login again and set our Try-me parameter again..
I assume you're using the manager web UI and using Try-Me apps. In this case, there's a great post here about setting the session timeouts for manager web UI.
But, I would also suggest not to use Try-Me as an actual client applications if the session timeout is a problem for you. There are few samples you can use to build a new app yourself here.
Thanks, It was very helpful.