If you are locked out of your Apple ID because the two-factor code is unavailable, there are still official recovery paths you can try.
The exact route depends on whether you still trust a device, have access to a trusted phone number, or need Apple’s account recovery process.
Why the Two-Factor Code Matters
Apple uses two-factor authentication to protect Apple ID accounts from unauthorized access.
When you sign in on a new device or browser, Apple sends a six-digit verification code to a trusted device or trusted phone number, and that code confirms it is really you.
If you cannot receive the code, the issue is usually one of these:
- You no longer have the trusted phone number.
- Your trusted device is offline, lost, or wiped.
- You changed carriers or SIM cards and lost access to text messages.
- You are trying to sign in from a location or device that Apple does not recognize.
Check Whether You Can Use a Trusted Device
The fastest fix is often a trusted Apple device already signed in with your Apple ID.
A trusted iPhone, iPad, or Mac can generate a verification code even when you cannot receive one by text or notification.
On iPhone or iPad, go to Settings, tap your name, then choose Sign-In & Security or Password & Security, and select Get Verification Code.
On Mac, open System Settings, select your Apple ID, then choose the option to get a verification code.
If you can access a trusted device, use it to sign in on the device or browser where you are locked out.
Try to Recover Access to the Trusted Phone Number
If the code was being sent to a trusted phone number, contact your mobile carrier first.
In many cases, restoring the same number to a replacement SIM or eSIM is the simplest way to regain access to SMS-based verification.
Keep in mind that the trusted number must be the exact number listed on your Apple ID.
If you changed numbers and cannot receive calls or texts to the old one, you may need to move to account recovery.
- Insert the active SIM or eSIM into a device that can receive SMS.
- Confirm the line is able to receive short code messages and regular texts.
- Check that your device is not blocking unknown senders or spam filters.
Use Account Recovery When the Code Is Unavailable
When you have no access to a trusted device or trusted number, Apple’s official path is account recovery.
This is the standard method for how to recover your Apple ID account when two factor code is unavailable.
Go to iforgot.apple.com and enter your Apple ID email address or phone number.
Follow the prompts to start recovery.
Apple may ask you to provide additional details, verify identity, and wait for a recovery period before access is restored.
Account recovery is designed to prevent fraud, so it can take time.
In some cases, Apple may provide an estimated waiting period and then contact you using the recovery information you submitted.
What Apple May Ask For During Recovery
Apple does not publish every step of its verification process, but users may be asked for:
- The Apple ID email address or phone number
- A trusted phone number where you can be reached
- Device ownership or other account details
- A verification code sent after the waiting period ends
Make sure the recovery contact information you provide is accurate and accessible.
Reset the Apple ID Password If You Can Still Sign In Somewhere
If you are still signed in on one Apple device, you may be able to change your Apple ID password without entering a code from another device.
This is useful when you know the account belongs to you but the verification message is failing.
On iPhone, open Settings, tap your name, then go to Sign-In & Security and choose Change Password.
On Mac, use System Settings and the Apple ID panel.
After changing the password, sign in again on your other devices.
This does not bypass security checks, but it can help if the problem is an expired password or an old sign-in session.
Check Common Problems That Block the Verification Code
Sometimes the code is not truly unavailable; it is simply delayed, filtered, or sent to the wrong place.
Before starting recovery, check the most common causes.
Network and device issues
- Turn Airplane Mode off and on again.
- Restart the trusted device.
- Make sure the device has an active internet connection.
- Update iOS, iPadOS, macOS, or watchOS if possible.
Phone number and message issues
- Confirm the trusted number is still active.
- Check that SMS and calls are enabled on the line.
- Look for blocked numbers or spam filtering.
- Make sure the device is not in Do Not Disturb or Focus mode.
Apple ID account changes
- Verify you are using the correct Apple ID email address.
- Check whether you recently changed your password.
- Look for account notices from Apple in email or device alerts.
What to Do If You No Longer Have Any Trusted Devices
If every trusted Apple device is lost, sold, erased, or broken, Apple will usually require account recovery.
This is especially common after switching phones, losing access to an old number, or buying a used device that was never properly signed out.
In that situation, do not keep repeatedly requesting codes from the sign-in screen.
Instead, use the recovery flow once, provide stable contact information, and wait for Apple’s instructions.
Repeated attempts can create confusion and do not speed up the process.
How to Prevent This Problem in the Future
After regaining access, strengthen your recovery setup so you are not blocked again.
A few preventive steps can save hours later.
- Add more than one trusted phone number if Apple allows it for your account setup.
- Keep at least one trusted Apple device signed in and updated.
- Store recovery contact details in a secure password manager or record.
- Use a phone number you expect to keep long term, such as a primary mobile line.
- Review your Apple ID sign-in settings after changing phones or carriers.
It also helps to confirm your backup methods before traveling, replacing a device, or changing your SIM card.
When to Contact Apple Support
If account recovery does not progress, or if you suspect unauthorized access, contact Apple Support directly.
Apple Support can explain available options, help you understand recovery status, and guide you through device-specific problems.
Have your Apple ID email address, trusted phone number, and device serial numbers ready if available.
Clear documentation makes it easier to verify ownership and move the case forward.
Quick Recovery Checklist
- Try getting a code from a trusted Apple device.
- Check whether the trusted phone number is active and reachable.
- Use iforgot.apple.com to start account recovery.
- Change the password if you are still signed in on another device.
- Review carrier, SMS, and device settings that may block the code.
- Contact Apple Support if recovery stalls or the account appears compromised.