My AirCo is using cloud to get commands, so I took the phone application and mapped the HTTP requests there to commands.
before using the API, I get 401 error to authenticate
And i see that the auth is POST to some page, and I get back JSESSION token I should use for anything else
You authenticate against the API and become a session token/ID.
This token you use in each request you will do against API
At last close session
So from your description I think you are unauthenticated and you will redirected to the authentication page. Authenticate take JSESSION token and put them into the header/body (where it is needed for API).
For this you must read the API documentation.