iPhones don't require an unlock code. This is ATT's procedure for unlocking iPhones
1. Open iTunes on your Mac or PC, verify that you have Internet connectivity, and have your USB cable ready.
2. Ensure the original SIM card that came with this device is inserted in your iPhone.
3. Connect your iPhone using the dock connector to USB cable that came with your iPhone.
4. Backup and restore your iPhone using iTunes. To learn how, visit https://support.apple.com/HT201252.
5. After restoring your iPhone using iTunes, your iPhone will be unlocked.
http://www.att.com/media/att/2014/support/pdf/ATTMobilityDeviceUnlockCodeInstruc tions.pdf