You must be a current or former T-Mobile customer or they will not provide the unlock. If you purchased the phone from a 3rd party you must contact the seller as they are the only one who can request the unlock code (provided they were a T-Mobile customer and meet the requirements).
If you are a customer you must meet the minimum requirements which are here in this link along with the process;
Need our help? Contact us.