Popular topics: Multilogin X, Multilogin 6,
CLI and Local API
Table of contents
Multilogin supports Command Line Interface (CLI) and Local API. This guide will introduce the basic CLI commands, Local API endpoints and provide usage examples.
3 steps to start using Local API:
- Predefine the application listening port
- Launch the Multilogin application manually or with CLI
- Use Local API endpoints
Multilogin port allocation
You need to predefine the application port in order to utilize Local API endpoints.
- Find the app.properties file in the .multiloginapp.com directory (depending on your OS settings, it may be hidden in your system):
- Windows: C:\Users\%username%\.multiloginapp.com
- Linux: /home/%username%/.multiloginapp.com
- macOS: /Users/%username%/.multiloginapp.com
To find this folder on Mac, open Finder and press Cmd + Shift + H
to open a user folder, then press Cmd + Shift + .
(period) to show hidden files. After that, go to the .multiloginapp.com folder.
2. Open the app.properties file in any text editor
3. Add the following string: multiloginapp.port=[PORT_NUMBER]
The port number has to be in the range of 10000 to 49151.
4. Save the app.properties file
Thereafter, you will be able to refer to the Multilogin application through this port.
Command Line Interface (CLI)
Before entering the following commands into the Command prompt, make sure your Cmd/Terminal is open in the directory specified below.
For Multilogin version 6.0 or higher
- Windows: C:\Program Files (x86)\Multilogin\headless
- macOS: /Applications/multilogin.app/Contents/MacOS/multilogin.app/Contents/MacOS
- Linux: /opt/Multilogin/headless
For Multilogin version 5.19 or lower
- Windows: C:\Program Files (x86)\Multilogin
- macOS: /Applications/multilogin.app/Contents/MacOS
If you are using a UNIX system, make sure to add execution permissions to the .sh file. You can do it by using the chmod +x
command (for example,chmod +x
headless.sh
).
Start Multilogin in headless mode
Windows
headless.exe
Linux/macOS
./headless.sh
Start Multilogin in headless mode on a predefined port (35000 used as an example)
Windows
headless.exe -port 35000
Linux/macOS
./headless.sh -port 35000
Keep in mind that although our app can be launched in headless mode, the browser profiles cannot. You still need to have a system with a graphical user interface in order to use them.
Log into your Multilogin account
Windows
cli.exe -login -u user@example.com -p password123
Linux/macOS
./cli.sh -login -u user@example.com -p password123
Local API
Local API endpoints are available in Multilogin versions 5.4 or higher.
As soon as you start Multilogin manually or with CLI, you can use Local API endpoints. Local API provides programmatic access to read and write data of Multilogin browser profiles. You can create a new browser profile, get a list of all browser profiles, add a browser profile to a group and more.
Local API endpoints
Local API endpoints are available in our Swagger documentation (aka OpenAPI Specification).
Our code example
Below are code examples of how to open an existing Multilogin browser profile and perform simple Selenium and Puppeteer browser automation:
Plan limits
Local API is only available for users with Scale and Custom Scale subscriptions, with certain endpoints limited to the number of requests per second.
If an API is accessed from a subscription plan, which does not include Local API usage, the server will respond with the following error:
{"status": "ERROR", "message": "Forbidden", "value": "Forbidden"}
Rate limits
Rate limits are applicable to all paid plan subscriptions. They differ by 2 endpoint types:
- For requests returning a list (e.g. listProfiles) — 1 request/minute
- All other requests — 10 requests/minute.
Upon reaching the limit, the server will respond with the following error:
{"status":"ERROR","value":"rate limit exceeded."}
If the API returns with an error, there is a 6-second timeout while even valid API calls will be rejected.