• 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

Custom Python scripts

Build powerful automation workflows with Python and the Multilogin API. Create, manage, and launch browser profiles with fully customizable scripts.

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
  • External automation tools
  • Home
  • breadcrumb separator bar
  • Multilogin X
  • breadcrumb separator bar
  • Task automation with API
  • breadcrumb separator bar
  • Custom Python scripts
  • breadcrumb separator bar
  • How to log in to Multilogin with Python

How to log in to Multilogin with Python

Written by Marcelo B ( Updated on May 2nd, 2025 )

Updated on May 2nd, 2025

Connecting to Multilogin from multiple devices or servers manually can be time-consuming. To automate this process, you can use the Paramiko library in Python.

In this article, you will learn how to do this using our script example. It iterates through a list of servers, each with its own credentials, and executes connection commands. 

Before you start

  1. Ensure your devices or servers are accessible via SSH with password authentication
  2. Install Python and libraries below on each device or server:
    1. requests
    2. paramiko 
  3. Save the script auto.py on your local device
  4. Save the script signinmlx.py on additional devices or servers
  5. Insert your values into the below variables in the script signinmlx.py:
    1. USERNAME: your Multilogin X account email
    2. PASSWORD: your Multilogin X account password (MD5 encryption is not required)
  6. Insert your values into the below variables in the script auto.py:
    1. SERVER-USERNAME
    2. SERVER-PASSWORD
    3. SERVER-IP

Running the script

The script examples below contain basic setup that allows you to log in to your Multilogin X account on several servers. Additionally, you can:

  • Add profile actions you want to trigger after sign in using signinmlx.py
  • Add more commands you want to execute on remote servers using auto.py
  • Add more servers to the parameter “users_credentials_and_ips” using auto.py

signinmlx.py

import requests
from hashlib import md5

# Input your Multilogin X account credentials
USERNAME = ""
PASSWORD = ""

MLX_BASE = "https://api.multilogin.com"
MLX_LAUNCHER = "https://launcher.mlx.yt:45001/api/v1"
HEADERS = {"Accept": "application/json", "Content-Type": "application/json"}

# Function
def sign_in(username, password):
    # HTTP requests to APIs
    sign_url = "https://api.multilogin.com/user/signin"
    HEADERS = {
        "Accept": "application/json",
        "Content-Type": "application/json",
    }
    Payload = {
        "email": username,
        "password": str(md5(password.encode()).hexdigest()),
    }
    # POST request
    resp = requests.post(sign_url, json=Payload, headers=HEADERS)
    resp_json = resp.json()
    # got bearer token
    token = resp_json["data"]["token"]
    return token

# PART 1
token = sign_in(USERNAME, PASSWORD)
HEADERS["Authorization"] = "Bearer " + token

print("token: " + token, end="")
 
 

auto.py

import paramiko

# Define the commands to run
commands = [
    # "mlx &",
    "python3 signinmlx.py"
]

# Define the list of users, passwords, and their corresponding IPs
users_credentials_and_ips = [
    # ("SERVER-USERNAME", "SERVER-PASSWORD", "SERVER-IP"),
    ("SERVER-USERNAME", "SERVER-PASSWORD", "SERVER-IP"),
]

# Iterate over each user, password, and IP
for user, password, ip in users_credentials_and_ips:
    print(f"Connecting to {user}@{ip}")
    try:
        # Connect to the SSH server with password authentication
        ssh_client = paramiko.SSHClient()
        ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
        ssh_client.connect(hostname=ip, username=user, password=password)

        # Execute each command
        for cmd in commands:
            print(f"Running command: {cmd}")
            stdin, stdout, stderr = ssh_client.exec_command(cmd)
            output = stdout.read().decode("utf-8")
            error = stderr.read().decode("utf-8")
            if output:
                print(output)
            if error:
                print(error)

        # Close the SSH connection
        ssh_client.close()
    except Exception as e:
        print(f"Error connecting to {user}@{ip}: {str(e)}")
 
 

Video guide

In this guide, we show how to run the auto.py and signinmlx.py scripts on a local machine with Windows 10 and a VirtualBox server with Ubuntu 20.

Your browser does not support HTML5 video.
auto login automatic log in to multilogin script example

Was this article helpful?

Give feedback about this article

In this article

  • Before you start
  • Running the script
  • signinmlx.py
  • auto.py
  • Video guide

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

  • How to fix “Application request limit is reached” error
  • How to perform browser automation in Multilogin 6

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