{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Quickstart","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"quickstart","__idx":0},"children":["Quickstart"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Get up and running with the MoreLogin API in 5 minutes."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"browser-automation-local-api","__idx":1},"children":["Browser Automation (Local API)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Scenario:"]}," Create a browser profile, launch it, connect via Puppeteer to run a script, and then stop it."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"prerequisites","__idx":2},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["MoreLogin desktop app ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["v2.15.0+"]}," installed and running locally."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Puppeteer installed (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["npm i puppeteer-core"]},")."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-1-create-a-browser-profile","__idx":3},"children":["Step 1: Create a Browser Profile"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"http://127.0.0.1:40000/api/env/create/quick\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"browserTypeId\": 1,\n    \"operatorSystemId\": 1,\n    \"quantity\": 1\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Save the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["envId"]}," from the response (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1993244721490239488"]},")."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-2-start-the-profile--get-debug-port","__idx":4},"children":["Step 2: Start the Profile & Get Debug Port"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"http://127.0.0.1:40000/api/env/start\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"envId\": \"1993244721490239488\"}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["The response will include the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["debugPort"]}," (e.g., ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["12345"]},")."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-3-connect-puppeteer-nodejs","__idx":5},"children":["Step 3: Connect Puppeteer (Node.js)"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"const puppeteer = require('puppeteer-core');\n\n(async () => {\n  const browser = await puppeteer.connect({\n    browserURL: 'http://127.0.0.1:12345'\n  });\n  const page = await browser.newPage();\n  await page.goto('https://www.morelogin.com');\n  console.log(await page.title());\n  await browser.disconnect();\n})();\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-4-stop-the-profile","__idx":6},"children":["Step 4: Stop the Profile"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"http://127.0.0.1:40000/api/env/close\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"envId\": \"1993244721490239488\"}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"cloud-phone-management-open-api","__idx":7},"children":["Cloud Phone Management (Open API)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Scenario:"]}," Quick-create a cloud phone, start it, install an application, and trigger an RPA schedule."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"prerequisites-1","__idx":8},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["API ID and API Key from the MoreLogin dashboard."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-1-get-access-token","__idx":9},"children":["Step 1: Get Access Token"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://api.morelogin.com/oauth2/token\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"client_id\": \"YOUR_API_ID\",\n    \"client_secret\": \"YOUR_API_KEY\",\n    \"grant_type\": \"client_credentials\"\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Save the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["access_token"]}," from the response."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-2-quick-create--start-cloud-phone","__idx":10},"children":["Step 2: Quick Create & Start Cloud Phone"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://api.morelogin.com/cloudphone/newMachine\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\" \\\n  -d '{\n    \"androidVersion\": 10,\n    \"duration\": 30,\n    \"unit\": 1\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Save the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," (Cloud Phone ID) from the response."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-3-install-an-app","__idx":11},"children":["Step 3: Install an App"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Assuming you already have an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["appVersionId"]}," from the app library:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://api.morelogin.com/cloudphone/app/install\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\" \\\n  -d '{\n    \"id\": 1673823102599682,  # Your Cloud Phone ID\n    \"appVersionId\": \"1672940217990530\"\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-4-run-an-rpa-schedule","__idx":12},"children":["Step 4: Run an RPA Schedule"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Execute a pre-configured automation script on your new cloud phone:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://api.morelogin.com/cloudphone/rpa/onceTask/save\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\" \\\n  -d '{\n    \"cloudPhoneId\": 1673823102599682,\n    \"scheduleName\": \"Daily Login Task\",\n    \"templateId\": 987654321\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"whats-next","__idx":13},"children":["What's Next?"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Goal"},"children":["Goal"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Go to"},"children":["Go to"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Full Browser Profile API reference"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/browser/local-api"},"children":["Browser API"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Full Cloud Phone API reference"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/cloud-phone/open-api"},"children":["Cloud Phone API"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Set up Docker for headless mode"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#"},"children":["Docker Deployment"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Connect via ADB"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/api-reference/cloud-phone/adb"},"children":["ADB Connection Guide"]}]}]}]}]}]}]},"headings":[{"value":"Quickstart","id":"quickstart","depth":1},{"value":"Browser Automation (Local API)","id":"browser-automation-local-api","depth":2},{"value":"Prerequisites","id":"prerequisites","depth":3},{"value":"Step 1: Create a Browser Profile","id":"step-1-create-a-browser-profile","depth":3},{"value":"Step 2: Start the Profile & Get Debug Port","id":"step-2-start-the-profile--get-debug-port","depth":3},{"value":"Step 3: Connect Puppeteer (Node.js)","id":"step-3-connect-puppeteer-nodejs","depth":3},{"value":"Step 4: Stop the Profile","id":"step-4-stop-the-profile","depth":3},{"value":"Cloud Phone Management (Open API)","id":"cloud-phone-management-open-api","depth":2},{"value":"Prerequisites","id":"prerequisites-1","depth":3},{"value":"Step 1: Get Access Token","id":"step-1-get-access-token","depth":3},{"value":"Step 2: Quick Create & Start Cloud Phone","id":"step-2-quick-create--start-cloud-phone","depth":3},{"value":"Step 3: Install an App","id":"step-3-install-an-app","depth":3},{"value":"Step 4: Run an RPA Schedule","id":"step-4-run-an-rpa-schedule","depth":3},{"value":"What's Next?","id":"whats-next","depth":2}],"frontmatter":{"seo":{"title":"Quickstart"}},"lastModified":"2026-05-13T03:54:13.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/api-reference/getting-started/quickstart","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}