Unlock codes, otherwise known as manufacturer codes, you'd have to purchase from a third party website. Getting it free would be difficult as us unlock code suppliers have a cost involved to have the code generated.
You can try us out if you'd like, or you can try to ask T-mobile again. They do have very strict policies and procedures before they will supply you with an unlock code though.