The ticket is a short term token (5min???) which allows you to connect without a username/password.
It is not a real secure solution, but with your script, you can insert a username and password into the http request.
http://USER:PASS@1.2.3.4:9981/stream/service/6a62c0103a229ae258116e4001ef21c2