Get up and running with the MoreLogin API in 5 minutes.
Scenario: Create a browser profile, launch it, connect via Puppeteer to run a script, and then stop it.
- MoreLogin desktop app v2.15.0+ installed and running locally.
- Puppeteer installed (
npm i puppeteer-core).
curl -X POST "http://127.0.0.1:40000/api/env/create/quick" \
-H "Content-Type: application/json" \
-d '{
"browserTypeId": 1,
"operatorSystemId": 1,
"quantity": 1
}'Save the envId from the response (e.g., 1993244721490239488).
curl -X POST "http://127.0.0.1:40000/api/env/start" \
-H "Content-Type: application/json" \
-d '{"envId": "1993244721490239488"}'The response will include the debugPort (e.g., 12345).
const puppeteer = require('puppeteer-core');
(async () => {
const browser = await puppeteer.connect({
browserURL: 'http://127.0.0.1:12345'
});
const page = await browser.newPage();
await page.goto('https://www.morelogin.com');
console.log(await page.title());
await browser.disconnect();
})();curl -X POST "http://127.0.0.1:40000/api/env/close" \
-H "Content-Type: application/json" \
-d '{"envId": "1993244721490239488"}'Scenario: Quick-create a cloud phone, start it, install an application, and trigger an RPA schedule.
- API ID and API Key from the MoreLogin dashboard.
curl -X POST "https://api.morelogin.com/oauth2/token" \
-H "Content-Type: application/json" \
-d '{
"client_id": "YOUR_API_ID",
"client_secret": "YOUR_API_KEY",
"grant_type": "client_credentials"
}'Save the access_token from the response.
curl -X POST "https://api.morelogin.com/cloudphone/newMachine" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-d '{
"androidVersion": 10,
"duration": 30,
"unit": 1
}'Save the id (Cloud Phone ID) from the response.
Assuming you already have an appVersionId from the app library:
curl -X POST "https://api.morelogin.com/cloudphone/app/install" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-d '{
"id": 1673823102599682, # Your Cloud Phone ID
"appVersionId": "1672940217990530"
}'Execute a pre-configured automation script on your new cloud phone:
curl -X POST "https://api.morelogin.com/cloudphone/rpa/onceTask/save" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-d '{
"cloudPhoneId": 1673823102599682,
"scheduleName": "Daily Login Task",
"templateId": 987654321
}'| Goal | Go to |
|---|---|
| Full Browser Profile API reference | Browser API |
| Full Cloud Phone API reference | Cloud Phone API |
| Set up Docker for headless mode | Docker Deployment |
| Connect via ADB | ADB Connection Guide |