If you did not buy your phone through Straight Talk, it is likely unlocked already, and no code is needed.

Straight Talk’s unlock policy is available here. Only GSM phones that use SIM cards can be unlocked. Other types of phones, like CDMA units, cannot generally be used with other carriers.