Popular topics: Multilogin X, Multilogin 6, Subscription & payments,
How to launch CookieRobot using Script Runner
Table of contents
CookieRobot makes your profiles look more legit by automatically collecting cookies from your chosen websites – no manual crawling needed! In this guide, we’ll walk you through how to use it to streamline the process.
Already familiar with automation or completed some steps? Use the table of contents on the right to jump straight to what you need. Let’s go!
Step 1: set up your Postman
Reminder: Before using Postman to run Multilogin X API endpoints and automation, make sure to update and connect your Agent.
📥 Download and install Postman from their official page.
After installing Postman, open the Multilogin X API Documenter page:
- In the top-right corner, click Run in Postman
- Select “Postman for <your OS>”
Your Postman Desktop will open. To import all API endpoints to your local collection:
- In “Import collection” → select your workspace
- Click Import → all endpoints will be available in folders
![](https://static.helpjuice.com/helpjuice_production/uploads/upload/image/16296/direct/1738951620414/Import%20Postman.png)
![](https://static.helpjuice.com/helpjuice_production/uploads/upload/image/16296/direct/1739130890761/image.png)
Sign in via Postman
You need to sign in with your credentials to generate an API token, which grants you permission to access API endpoints and perform actions.
Locate the User Sign in endpoint
- Open “Collections” → expand the “Multilogin X API” folder
- Open “Profile Access Management” folder
- Select the POST User Sign In endpoint (What is a POST request?)
![](https://static.helpjuice.com/helpjuice_production/uploads/upload/image/16296/direct/1738974236329/image.png)
Convert your password to MD5
You need to use the User Sign In endpoint to get your access token, but there is a catch: your password needs to be encrypted to MD5.
This is how to use MD5 Hash Generator to get your encrypted password:
- Insert your Multilogin X password
- Click “Generate”
- Copy your MD5 encrypted password 🛡️
![](https://static.helpjuice.com/helpjuice_production/uploads/upload/image/16296/direct/1738943080770/image.png)
Get your API token
Regular tokens are valid for 30 minutes. If you have Solo plan (or higher), use Workspace Automation Token endpoint for options that last longer.
- In POST User Sign In → go to “Body” tab
- Fill in your e-mail and your MD5 password as
“strings”
- Send the request to sign in
![](https://static.helpjuice.com/helpjuice_production/uploads/upload/image/16296/direct/1739115138261/image.png)
- Check the access token in the Response area below → Copy everything inside quotation marks
![](https://static.helpjuice.com/helpjuice_production/uploads/upload/image/16296/direct/1739117168311/image.png)
Step 2: open Script Runner
Stay updated: Script Runner requires Agent 1.37.4 or newer. If unsure, follow the steps to check your Agent version here.
Now that you're signed in and have the token, you have all access to use the Script Runner endpoint and run your CookieRobot script!
- Go back to “Collections” → “Multilogin X API” folder
- Go to “Script Runner” folder
- Open POST Start Script Runner endpoint to configure a new API request!
![](https://static.helpjuice.com/helpjuice_production/uploads/upload/image/16296/direct/1739117368008/image.png)
- From the “Params” tab, proceed to “Authorization”
- Select “Bearer Token” as the Auth Type
- In the Token field at the right, paste your API token previously copied
![](https://static.helpjuice.com/helpjuice_production/uploads/upload/image/16296/direct/1739122627574/image.png)
Filling the “Authorization” tab with your Bearer Token, you become able to parse requests to open the CookieRobot in Script Runner! 🔑
Add the CookieRobot script
CookieRobot currently supports all types of browser profiles, except mobile profiles.
Once your token is inserted in the Authorization tab:
- Proceed to the “Body” tab
- Make sure that raw parameter is selected
- Insert the sample CookieRobot request body (JSON):
{
"script_file": "cookie_robot.py",
"profile_ids": [
{
"profile_id": "profile uuid"
},
{
"profile_id": "profile uuid",
"is_headless": true
}
],
"script_params": [
{
"name": "websites",
"value": ["https://youtube.com","https://google.com","https://fb.com","https://amazon.com"]
},
{
"name": "randomOrder",
"value": true
},
{
"name": "countMode",
"value": 0.7
},
{
"name": "processCookieConsent",
"value": true
}
]
}
![](https://static.helpjuice.com/helpjuice_production/uploads/upload/image/16296/direct/1739133080127/image.png)
The name of the CookieRobot script is cookie_robot.py
. It is already added to the “script_file”
line, so no need to manually update it.
Step 3: customize the parameters
When launching CookieRobot, there are several customizable parameters that influence how the crawling process works. These parameters allow users to adjust settings such as the target website, crawling order, and more. By fine-tuning these options in the “script_params”
section, users can optimize the script’s performance based on their specific needs.
The customizable CookieRobot parameters are highlighted with red color on the screenshot and below:
![](https://static.helpjuice.com/helpjuice_production/uploads/upload/image/16296/direct/1739209006729/Start%20Script%20Runner%20-%20My%20Workspace%202025-02-10%20at%206.34.14%20PM.jpg)
“profile_ids”
A list that contains profile IDs, structured as:
-
“profile_id”
– unique profile ID number -
“is_headless”
– (optional) running in headless mode might limit the bot's interaction with certain page elements
“script_params”
A list containing a set of customizable parameters, simply indicated by:
-
“name”
– the parameter name -
“value”
– the assigned value (string, integer, float, JSON, etc.)
“websites”
If nothing is provided in the “websites”
parameter, the robot will use its default list:
websites = [
"https://aliexpress.com",
"https://amazon.com",
"https://ebay.com",
"https://fiverr.com",
"https://google.com",
"https://reddit.com",
"https://twitch.com",
"https://twitter.com",
"https://yahoo.com",
"https://youtube.com",
"https://en.wikipedia.org"
]
We recommend collecting cookies from multiple sources for a more realistic fingerprint. Check out collecting cookies: our tips article for more info.
“randomOrder”
“countMode”
Want to run just a portion of your websites, instead of all of them? Check how to use it:
- Choose a float number between 0.0 and 1.0 to set the fraction of sites to run
- Make sure that
“randomOrder”
is set to“true”
Example: if using "countMode"= “0.5”
, it will run 50% of the list of websites in a random order
“processCookieConsent”
Many websites display an “Allow Cookies” button due to privacy laws like GDPR (What is GDPR?), which requires user consent before tracking cookies.
- Set to
“true”
→ CookieRobot will look for and try to click the consent button automatically (Default) - Set to
“false”
→ it will ignore cookie pop-ups, which can be useful if:- You're browsing non-EU websites that don’t show cookie banners
- You’re not concerned about GDPR compliance (e.g., using proxies outside the EU)
Step 4: run CookieRobot
Once your parameters are configured as you need:
- Click Send to run the POST Start Script Runner request
- Check the request response: Status 200 OK means success!
- Your CookieRobot script will launch the selected profile(s). If non-headless, you will be able to watch the crawling in real time! 🔍
![](https://static.helpjuice.com/helpjuice_production/uploads/upload/image/16296/direct/1739135481277/image.png)
If you get a 401 Unauthorized error when sending the request, your token might have expired:
In case this happens, redo the steps in “Get your API token” to generate a new Bearer Token.
![](https://static.helpjuice.com/helpjuice_production/uploads/upload/image/16296/direct/1739136510809/image.png)
Extra: want to see a Python code application?
In this example, settings are configured in the payload
object, inside the run_script()
function:
- CookieRobot will be running through the file
cookie_robot.py
. - The profile IDs worked are set to
ced16576-a67b-4ae5-8459-c07991d50f27
andec0cf95f-b199-4b1c-b394-af1e01ac9c09
- Both profiles will run in non-headless mode
- The websites are Yahoo.com and Amazon.com, and they will be visited in a random order
- Since
countMode
is set to 1, 100% of the websites listed will be visited. - CookieRobot will automatically accept cookie consent notices if they appear
import logging
import requests
import json
# In project root you need a file called token with your auth token in there
def setup_logging():
"""Set up logging configuration."""
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s - %(levelname)s - %(message)s",
handlers=[
logging.FileHandler("script_runner.log"),
logging.StreamHandler()
]
)
def get_token_from_file():
"""Read the token from a file called 'token' in the project root."""
try:
with open("token", "r") as file:
token = file.read().strip()
return token
except FileNotFoundError:
logging.error("Token file not found in the project root.")
raise
except Exception as e:
logging.error("An error occurred while reading the token file: %s", str(e))
raise
def run_script():
url = "https://launcher.mlx.yt:45001/api/v1/run_script"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {get_token_from_file()}"
}
payload = {
"script_file": "cookie_robot.py",
"profile_ids": [
{
"profile_id": "ced16576-a67b-4ae5-8459-c07991d50f27",
"is_headless": False
},
# {
# "profile_id": "ec0cf95f-b199-4b1c-b394-af1e01ac9c09",
# "is_headless": False
# },
],
"script_params": [
{
"name": "websites",
"value": ["yahoo.com", "amazon.com"]
},
{
"name": "randomOrder",
"value": True
},
{
"name": "countMode",
"value": 1
},
{
"name": "processCookieConsent",
"value": True
}
]
}
try:
logging.info("Payload to send: %s", json.dumps(payload, indent=4))
logging.info("Sending request to the script runner endpoint...")
response = requests.post(url, headers=headers, data=json.dumps(payload), timeout=30)
if response.status_code == 200:
logging.info("Script executed successfully.")
logging.info("Response: %s", response.json())
else:
logging.error("Failed to execute script. Status code: %d", response.status_code)
logging.error("Response: %s", response.text)
except requests.exceptions.RequestException as e:
logging.error("An error occurred while making the request: %s", str(e))
if __name__ == "__main__":
setup_logging()
run_script()