Contact Us
If you still have questions or prefer to get help directly from an agent, please submit a request.
Popular topics: Multilogin X, Multilogin 6,
-
Retrieving the token Using the automation token in a workspace Retrieving profile, folder, and workspace IDs Retrieving the user ID Selenium automation example Playwright automation example Puppeteer automation example Logging in to Multilogin automatically Setting up automatic cookie collection Auto-launching the agent Exporting proxy details from profiles Converting external proxy lists into API-ready JSON files Automation FAQ
-
Error: Failed to get IP data: can't connect through proxy Error: Javax.crypto.badpaddingexception: pad block corrupted Status: Update in progress...Loading (1) of 2 components Error: Fingerprint composition failed Connection error due to non-Latin characters in Windows username Error: Mimic/Stealthfox executable is not found Multilogin 6 browser profile shows "Error" in status Can't launch a profile in Multilogin 6 JavaScript error when switching to dark mode in Multilogin 6 Common errors and solutions in Multilogin 6
Retrieving the token
Written by Yelena Varabyeva
Updated on August 2nd, 2024
Table of contents
In order to use the API, you must send a valid token with your requests. This article goes over how to get that authentication token.
The token expires in 30 minutes. You can refresh it with the "User Refresh Token" endpoint. Also you can use the automation token and specify the required expiration period yourself (not available in the Starter plan).
Using DevTools
- Log in to app.multilogin.com
- Open DevTools in your browser. Here's how to do that for Chromium- and Firefox-based browsers:
- Windows and Linux: press
Ctrl + Shift + I
- macOS: press
Cmd + Option + I
- Windows and Linux: press
- Switch to the "Application" tab in the DevTools panel
- On the left side menu, click “Local storage” → “https://app.multilogin.com”
- Copy the full value of the token attribute
Using Python
Complete the steps below to be able to run the provided script example.
- Install the following Python library: requests
- Insert your values into the below variables in the script:
-
USERNAME
: your Multilogin X account email -
PASSWORD
: your Multilogin X account password (MD5 encryption is not required)
-
import json
import requests
import hashlib
MLX_BASE = "https://api.multilogin.com"
MLX_LAUNCHER = "https://launcher.mlx.yt:45001/api/v2"
LOCAL_HOST = "http://127.0.0.1"
HEADERS = {'Accept': 'application/json',}
#TODO: Insert your account information in both variables below.
USERNAME = ""
PASSWORD = ""
def sign_in():
payload = {
'email': USERNAME,
'password': hashlib.md5(PASSWORD.encode()).hexdigest()
}
r = requests.post(f'{MLX_BASE}/user/signin', json=payload)
if r.status_code != 200:
print(f'\nFailed to login: {r.text}\n')
else:
response = json.loads(r.text)
token = response.get('data').get('token')
print(token)
return token
# Call the sign_in function to execute it
token = sign_in()