• Website
  • Server status
  • API documentation
  • Blog
Telegram Icon Community
EN
English
Português
Русский
中文 (中国)
Tiếng Việt
Log in Try for €1.99
  • Website
  • Server status
  • API documentation
  • Blog
  • Telegram Icon Community
  • English (US)
    English
    Português
    Русский
    中文 (中国)
    Tiếng Việt
Log in View Plans

Basic automation with CLI

Use the command line to automate browser profiles, launch sessions, and execute tasks efficiently.

search icon

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Getting started with Multilogin X automation
  • Basic automation with CLI
  • Low-code automation with Postman
  • Script runner & predefined scripts
  • Puppeteer, Selenium, and Playwright
  • Custom Python scripts
  • Quick solutions with Developer Tools
  • Home
  • breadcrumb separator bar
  • Multilogin X
  • breadcrumb separator bar
  • Task automation with API
  • breadcrumb separator bar
  • Basic automation with CLI
  • breadcrumb separator bar
  • How to enable 2FA (2-factor authentication) in CLI

How to enable 2FA (2-factor authentication) in CLI

Written by Marcelo B ( Updated on April 11th, 2025 )

Updated on April 11th, 2025

How can 2-factor authentication help me?

2-factor authentication (2FA) adds one more layer to your login process, but it’s worth it. It helps protect your account even if someone steals your password. When trying to log in, after you type in your password, you’ll also need to enter a code from your phone or app: even if someone knows your password, they still can’t get in, making it way harder to hack.

How to enable 2FA

Before using 2FA commands, use xcli login to get yourself a token. Failure to log in before performing 2FA tasks will cause token errors.

 

Enable 2FA for the user

If you wish to activate 2FA for the current user in Multilogin X CLI:

  1. Enter xcli enable-2fa --device devicename
    • devicename → choose the name it will appear in the 2FA application
  2. Once the command is parsed, the CLI tool will automatically generate a QR code
  1. Open your desired authenticator app (such as Google Authenticator, Microsoft Authenticator)
  2. Choose to add a new QR code and scan the output → this will create an entry in your authenticator app called MLX
    • Note: if you already have an authenticator input called MLX, you will be prompted to choose a new name
  3. Find the code shown in your authenticator → type it into the code area
  4. Once done, you will see a success message alongside your backup codes. Store them in a safe place.

Backup codes are one-time-use codes, emergency keys that let you log in if you lose access to your app or phone.

 

Enable 2FA for the workspace

Want to activate the use of 2FA for all users in the workspace, instead of just your own? Follow the steps below:

  1. Make sure you have completed all the steps to enable 2FA in the previous section
  2. Once the activation is complete, you are able to activate this same key for the workspace
  3. Enter xcli enable-2fa-for-workspace  

How to disable 2FA

Disable 2FA for the user

Disabling 2FA is even easier than enabling it! Just enter xcli disable-2fa  and that's it! No flags needed. Your previously enabled 2FA will be turned off.

Disable 2FA for the workspace

Disabling 2FA for the workspace affects all its members. To proceed, just enter xcli disable-2fa-for-workspace, no extra flags needed.

How to view 2FA backup codes

Need to recheck your backup codes? It is as easy as one-step in CLI! It is easy to check what are your current backup codes. Just type view-backup-codes

2FA commands table

Command/Type

For a specific user

For everyone in the workspace

Enable 2FA

enable-2fa

enable-2fa-for-workspace

Disable 2FA

disable-2fa

disable-2fa-for-workspace

View backup codes

–

view-backup-codes


Was this article helpful?

Give feedback about this article

In this article

  • How can 2-factor authentication help me?
  • How to enable 2FA
  • Enable 2FA for the user
  • Enable 2FA for the workspace
  • How to disable 2FA
  • Disable 2FA for the user
  • Disable 2FA for the workspace
  • How to view 2FA backup codes
  • 2FA commands table

Multilogin community

Stay informed, share your thoughts, and engage with others!

Telegram Icon Join us on Telegram

Read more on the topic

Blog Post Img

10 Best Datacenter Proxies for Web Scraping (2025 Edition)

Apr 2, 2025 5 min read
Google SERP Img

What is a Google SERP Proxy and Why Should You Care?

Apr 1, 2025 6 min read
UK Proxy Img

What Are Dedicated UK Proxies? Everything You Need to Know

Apr 1, 2025 6 min read
Related Article Title Icon

Related Articles

  • Learn CLI commands
  • How to use CLI as a team member
  • How to use Script runner with Multilogin CLI

ANTIDETECT PLATFORM

  • Antidetect browser
  • Mobile antidetect browser
  • Headless browser
  • Multilogin residential proxies
  • Multi-account management
  • Web automation

RESOURCES

  • Knowledge base
  • API documentation
  • Glossary
  • Blog
  • Multilogin 6 download
  • Server status
  • Release notes

PLATFORM PROXIES

  • Google proxy
  • Facebook proxy
  • Reddit proxy
  • Twitter proxy
  • Amazon proxy
  • LinkedIn proxy

GEO PROXIES

  • Japan proxy
  • UK proxy
  • USA proxy
  • China proxy
  • Canada proxy
  • India proxy

MULTI-ACCOUNT MANAGEMENT

  • Create multiple Facebook accounts
  • Create multiple LinkedIn accounts
  • Create multiple Amazon accounts
  • Create multiple eBay accounts
  • Create multiple Gmail accounts
  • Create multiple Discord accounts

COMPARISON

  • Multilogin vs. Gologin
  • Multilogin vs. Adspower
  • Multilogin vs. Dolphin Anty
  • Multilogin vs. Incognition
  • Multilogin vs. Octo Browser

GET IN TOUCH

  • Contact 24/7 support
    [email protected]
  • Contact sales
  • Affiliate program
  • Careers

© 2025 Multilogin. All rights reserved.

  • Privacy policy
  • Terms of service
  • Cookie policy
Multilogin abstract watermark
  • ANTIDETECT PLATFORM

    • Antidetect browser
    • Mobile antidetect browser
    • Headless browser
    • Multilogin residential proxies
    • Multi-account management
    • Web automation
  • RESOURCES

    • Knowledge base
    • API documentation
    • Glossary
    • Blog
    • Multilogin 6 download
    • Server status
    • Release notes
  • MULTI-ACCOUNT MANAGEMENT

    • Create multiple Facebook accounts
    • Create multiple LinkedIn accounts
    • Create multiple Amazon accounts
    • Create multiple eBay accounts
    • Create multiple Gmail accounts
    • Create multiple Discord accounts
  • COMPARISON

    • Multilogin vs. Gologin
    • Multilogin vs. Adspower
    • Multilogin vs. Dolphin Anty
    • Multilogin vs. Incognition
    • Multilogin vs. Octo Browser
  • PLATFORM PROXIES

    • Google proxy
    • Facebook proxy
    • Reddit proxy
    • Twitter proxy
    • Amazon proxy
    • LinkedIn proxy
  • GEO PROXIES

    • Japan proxy
    • UK proxy
    • USA proxy
    • China proxy
    • Canada proxy
    • India proxy
  • GET IN TOUCH

    • 24/7 support: [email protected]
    • Contact sales
    • Affiliate program
    • Careers
Multilogin abstract watermark
  • Privacy policy
  • Terms of service
  • Cookie policy

© 2025 Multilogin. All rights reserved.

Expand