Clicky

CLI and Local API

Updated 3 days ago by Igor Vilinchuk

Related articles

Multilogin supports Command Line Interface (CLI) commands 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:

1. Predefine the application listening port

2.
Launch the Multilogin application manually or with CLI

3.
Use Local API endpoints

1. Multilogin port allocation

You need to predefine the application port in order to utilize Local API endpoints.

  1. Find the app.properties file in the .multiloginapp.com directory (it may be hidden in your system):
  • Windows: C:\Users\%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.
  • Linux: /home/%username%/.multiloginapp.com
  1. Open the app.properties file in any text editor
  2. Add the following string: multiloginapp.port=[PORT_NUMBER]
  3. Save the app.properties file

Thereafter, you will be able to refer to the Multilogin application through this port.

2. Command Line Interface (CLI)

Before entering the following commands in the Command prompt, make sure your Cmd/Terminal is opened in the main Multilogin directory (for Windows it's usually "C:\Program Files (x86)\Multilogin").
If you are using a UNIX system, make sure that you have added execution permissions to the .sh file. You can add execution permissions to a file by using chmod +x command (for example: "chmod +x multilogin.sh").
Start Multilogin with UI on random port

Windows

multilogin.exe

Linux/macOS

./multilogin.sh
Start Multilogin without UI 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 [email protected] -p password123

Linux/macOS

./cli.sh -login -u [email protected] -p password123

3. 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. 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 (a.k.a OpenAPI Specification).

Test our code example

See below code examples of how to open the existing Multilogin browser profile and perform simple Selenium and Puppeteer browser automation:

Plan limits

Local API is only available for users with Automate and 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.

Video on the topic

For further information, contact our support team.


Check out our latest news, research and tutorials


Was this article helpful?