Most carriers will provide the code for free if your contract has ended or if you paid for the device in full.
Knowing these factors allows for a more specific, risk-free recommendation. Share public link