I'm trying to create and API session call
The code you keep posting makes zero sense to me. It seems you don't understand what the token is, why you need it and how Traccar API works in the first place. I recommend you to do a lot more research first, including reading documentation, studying official apps etc.
i got it, actually i am trying to create session with traccar api.
You already created a session with login/password. What do you need the token for?
But i am not getting session or cookie, thats why sir.
This was actually worked by another developer now i am trying to get it work.