Congrats, but how did you get it for free? And is this Tmobile Australia or Tmobile USA?
It's a T-mobile USA of course!

You simply just call to T mobile service center then tell them that you are going to take your phone abroad with you to Europe or something, and they will transfer the line to the "International help desk" or you can just ask them to redirect you. And then you just give them the IMEI number of the phone and they will give you the unlock code! that's all.
Cheers!