On your own:
If it is your own apple id, you can get the password back by registering your email address or keeping it secret when registering. Your email address when you first registered was your apple id account.
Apple official website retrieves the password address of apple id:
/kb/HT5787? viewlocale=zh_CN
Looking for Apple official:
If you can produce enough proof of purchase, prove that this mobile phone is for your own use. In this case, you can apply to Apple to unlock or reset the ID and password. (Note: Chinese mainland only supports licensed products) If it is an iPhone from other countries, it won't work.
Find a third-party repair shop:
Change the hardware information of the mobile phone, and change the serial number and IMEI number to the number of the unbound server. Replace the hardware chip, and the iPhone series needs to replace the hard disk and baseband kit. (Note: However, this method can only be found by a third-party repairer and must be solved by replacing the hardware. Of course, it is paid, but there is no specific repair shop to provide this service. If you really can't go this far, you can only ask the local repair shop. )
Tips: When I answered a series of questions about "Forgot ID password", I found that some respondents would leave their QQ and tell you that they can crack it. I know these groups. Most of them are frauds. Take advantage of people's eagerness to forget their id, let them remit money to them first, and then help them crack their id. Although they are eager to forget the id password, they still need to be rational. Don't trust the so-called cracked id easily.
Whether you found the device or really forgot the id password, I have found a lot on the Internet and Taobao. Basically, only these three passwords can temporarily retrieve and crack the apple id.