Apple really doesn't use codes to unlock their devices. It is digital with iTunes. Have you received an email?
Also are you a current or former customer of t mobile and have used th is phone on your account?
I have an iphone se, and I am a current T-mobile customer in the USA. I just need to know when my code will approx arrive so I can use my phone in Belgium with another carrier.