Two-factor Authentication (2FA) and PhantomBuster: What you Need to Know

  • Updated

Phantoms can't complete two-factor authentication (2FA) prompts on Facebook, Instagram and other platforms. When a platform asks for a verification code during a launch, the Phantom can't enter it and the launch stops. You also can't turn on 2FA to sign in to your PhantomBuster account, because PhantomBuster only offers sign-in with your email and password. LinkedIn is the only exception: when you connect your LinkedIn account with your email and password, you can keep 2FA turned on.

LinkedIn accounts work with 2FA

PhantomBuster handles 2FA on LinkedIn when you connect your account with your email and password. If LinkedIn asks for a verification code during the connection, then a prompt is displayed where you can enter it. To learn how to connect, see How to Connect Your LinkedIn Account with Your Email and Password.

Sales Navigator requires 2FA to be turned on in your LinkedIn account. If your Phantom stops with the "2FA security detected" error, see How to Fix the "2FA Security Detected" Error on Sales Navigator.

Why 2FA isn't supported in Phantom automations

On platforms such as Facebook and Instagram, Phantoms run from the cloud with a copy of your login session, called a session cookie. The platform sometimes asks for a verification code when it detects a login from a new location, such as PhantomBuster's servers. The Phantom can't enter this code, so it's redirected to a verification page and the launch stops.

What to do if your account uses 2FA

These steps apply to Facebook, Instagram and other platforms. For LinkedIn, connect with your email and password instead.

For personal accounts

  1. Complete the verification in your own browser.
  2. Reconnect the account with the PhantomBuster browser extension to give the Phantom a fresh session.
  3. Launch the Phantom again.

If the verification prompts keep coming back, turn off 2FA on that account or use an account that doesn't require it.

For business accounts or teams

Ask your IT team or account administrator whether 2FA can be turned off for the account you use in automation. If that isn't possible, use a different account that doesn't require 2FA.

How to confirm a 2FA redirect in your logs

Open your Phantom, go to the console and open the logs of the most recent failed launch.

  • On Facebook, the logs show the message "Cookies are correct but Facebook is asking for an account verification." If you don't use a proxy, the message also recommends adding one. See How to Use a Proxy with PhantomBuster.
  • On Instagram, a verification request is treated as a disconnection, and the logs show the message "Disconnected by Instagram, exiting..."

In both cases, follow the steps in the previous section.

Tips to keep your session active and stable

Sessions can expire or become invalid even without 2FA. To keep your Phantoms running smoothly, follow these tips:

  • Don't log out of the platform in your browser, because logging out invalidates your session cookie.
  • When a session expires, reconnect with the PhantomBuster browser extension to retrieve a fresh session cookie in one click.
  • Start your automation slowly to avoid triggering the platform's security checks.

2FA and your PhantomBuster account

You can't turn on 2FA to sign in to your PhantomBuster account, because PhantomBuster only offers sign-in with your email and password. To keep your account secure, use a strong password that you don't reuse on other sites.

Frequently asked questions

Does PhantomBuster work with 2FA on Facebook or Instagram?

No. Phantoms can't enter verification codes on these platforms, so a 2FA prompt stops the launch.

Can I turn 2FA back on after connecting my Facebook or Instagram account?

Yes, but the next time the platform asks for a verification code during a launch, the Phantom will stop. You'll then need to complete the verification in your browser and reconnect the account.

Can I turn on 2FA for my PhantomBuster account?

No. PhantomBuster only offers sign-in with your email and password.

Should I turn off 2FA on my LinkedIn account?

No, you can keep 2FA on when you connect with your email and password. See How to Connect Your LinkedIn Account with Your Email and Password.

Was this article helpful?

0 out of 1 found this helpful