# Open API

The MoreLogin Open API provides a powerful, remote RESTful interface exclusively for managing **Cloud Phones** at scale. This cloud-hosted API empowers developers to programmatically create phone instances, install apps, manage files, and orchestrate RPA schedules from anywhere, without needing a local client running.

Version: 1.0.0

## Servers

MoreLogin open api endpoint
```
https://api.MoreLogin.com
```

## Security

### Authorization

Token for request access token interface response access_token field

Type: http
In: header
Name: Authorization
Scheme: bearer
Bearer Format: JWT

## Download OpenAPI description

[Open API](https://guide.morelogin.com/_bundle/API%20Reference/Cloud%20Phone/open-api.yaml)

## Authorization

### Access Token

 - [POST /oauth2/token](https://guide.morelogin.com/api-reference/cloud-phone/open-api/authorization/paths/~1oauth2~1token/post.md)

### Get Current User Profile

 - [GET /oauth2/userinfo](https://guide.morelogin.com/api-reference/cloud-phone/open-api/authorization/paths/~1oauth2~1userinfo/get.md)

## Cloud Phone Management

### List Cloud Phone Profiles

 - [POST /cloudphone/page](https://guide.morelogin.com/api-reference/cloud-phone/open-api/cloud-phone-management/pageusingpost.md)

### Create Cloud Phone

 - [POST /cloudphone/create](https://guide.morelogin.com/api-reference/cloud-phone/open-api/cloud-phone-management/createusingpost.md)

### Start Cloud Phone

 - [POST /cloudphone/powerOn](https://guide.morelogin.com/api-reference/cloud-phone/open-api/cloud-phone-management/poweronusingpost.md)

### Stop Cloud Phone

 - [POST /cloudphone/powerOff](https://guide.morelogin.com/api-reference/cloud-phone/open-api/cloud-phone-management/poweroffusingpost.md)

### Update Cloud Phone Profile

 - [POST /cloudphone/edit/batch](https://guide.morelogin.com/api-reference/cloud-phone/open-api/cloud-phone-management/editbatchusingpost.md)

### Set cloud phone proxy

 - [POST /cloudphone/setProxy](https://guide.morelogin.com/api-reference/cloud-phone/open-api/cloud-phone-management/setproxy.md): Set proxy settings for one or more cloud phones. Supports binding proxyId directly, or adding/modifying detailed proxy parameters. The request payload format is identical to browser proxy configuration, and settings are synchronized to channel providers in real-time.

### Delete Cloud Phone

 - [POST /cloudphone/delete/batch](https://guide.morelogin.com/api-reference/cloud-phone/open-api/cloud-phone-management/deleteusingpost.md)

### One-click new machine

 - [POST /cloudphone/newMachine](https://guide.morelogin.com/api-reference/cloud-phone/open-api/cloud-phone-management/onenewusingpost.md)

### Get Cloud Phone Details

 - [POST /cloudphone/info](https://guide.morelogin.com/api-reference/cloud-phone/open-api/cloud-phone-management/infousingpost.md)

### Get Cloud Phone Details By AndroidId

 - [POST /cloudphone/queryByAndroidId](https://guide.morelogin.com/api-reference/cloud-phone/open-api/cloud-phone-management/querybyandroidid.md): Query the cloud phone ID associated with a specific androidId under the current team. Returns the single cloud phone ID if found.

### Enable or disable global ROOT

 - [POST /cloudphone/enableRoot](https://guide.morelogin.com/api-reference/cloud-phone/open-api/cloud-phone-management/enableroot.md): Enable or disable the global system-level ROOT permission on a single cloud phone.

### Cloud phone screen capture

 - [POST /cloudphone/screenCap](https://guide.morelogin.com/api-reference/cloud-phone/open-api/cloud-phone-management/screencap.md): Get the real-time screen capture of the specified cloud phone instance. Supports returning a temporary signed URL with an expiration timestamp.

### Cloud phone screen capture (response base64)

 - [POST /cloudphone/screenCapBase64](https://guide.morelogin.com/api-reference/cloud-phone/open-api/cloud-phone-management/screencapbase64.md): Get the real-time screen capture of the specified cloud phone instance. Currently, only Android 12 and Android 15 are supported.

### List Device Brands & Models

 - [POST /cloudphone/brand/models](https://guide.morelogin.com/api-reference/cloud-phone/open-api/cloud-phone-management/paths/~1cloudphone~1brand~1models/post.md): Query available brand & model list for given Android version

## ADB

### Update ADB Connection Status

 - [POST /cloudphone/updateAdb](https://guide.morelogin.com/api-reference/cloud-phone/open-api/adb/updateadbusingpost.md)

### Batch Query ADB Info

 - [POST /cloudphone/batchAdbInfo](https://guide.morelogin.com/api-reference/cloud-phone/open-api/adb/batchadbinfoopenapi.md): Batch query cloud phone ADB connection info.
- The envIds list supports a maximum of 200 items
- Supports mixed queries across wuin and arm providers; the API internally groups by provider and merges results
- ADB info is only available when the phone is powered on (envStatus >= 4); it cannot be queried when powered off or booting

### Execute ADB Shell Command

 - [POST /cloudphone/exeCommand](https://guide.morelogin.com/api-reference/cloud-phone/open-api/adb/executeshellcommand.md)

## Files

### Request File Upload URL

 - [POST /cloudphone/uploadUrl](https://guide.morelogin.com/api-reference/cloud-phone/open-api/files/get.md): Upload temporary files through this interface, and the system will automatically delete them after 7 days

### Upload File

 - [POST /cloudphone/uploadFile](https://guide.morelogin.com/api-reference/cloud-phone/open-api/files/fileuploadusing.md)

### Get File Upload Result

 - [POST /cloudphone/uploadFileResult](https://guide.morelogin.com/api-reference/cloud-phone/open-api/files/fileuploadresult.md)

### Request File Download URL

 - [POST /cloudphone/download](https://guide.morelogin.com/api-reference/cloud-phone/open-api/files/paths/~1cloudphone~1download/post.md)

### Get File Download Result

 - [POST /cloudphone/download/result](https://guide.morelogin.com/api-reference/cloud-phone/open-api/files/paths/~1cloudphone~1download~1result/post.md)

### Configure Keybox

 - [POST /cloudphone/setKeyBox](https://guide.morelogin.com/api-reference/cloud-phone/open-api/files/paths/~1cloudphone~1setkeybox/post.md)

## Apps

### Install App on Cloud Phone

 - [POST /cloudphone/app/install](https://guide.morelogin.com/api-reference/cloud-phone/open-api/apps/paths/~1cloudphone~1app~1install/post.md)

### List Available Apps

 - [POST /cloudphone/app/page](https://guide.morelogin.com/api-reference/cloud-phone/open-api/apps/paths/~1cloudphone~1app~1page/post.md): Fetch the list of team applications

### List Team Apps

 - [POST /cloudphone/team/app/page](https://guide.morelogin.com/api-reference/cloud-phone/open-api/apps/paths/~1cloudphone~1team~1app~1page/post.md): Fetch the list of team applications

### List Installed Apps

 - [POST /cloudphone/app/installedList](https://guide.morelogin.com/api-reference/cloud-phone/open-api/apps/paths/~1cloudphone~1app~1installedlist/post.md): Query list of installed apps on a cloud phone

### Launch App

 - [POST /cloudphone/app/start](https://guide.morelogin.com/api-reference/cloud-phone/open-api/apps/paths/~1cloudphone~1app~1start/post.md): Launch an installed app on the cloud phone

### Restart App

 - [POST /cloudphone/app/restart](https://guide.morelogin.com/api-reference/cloud-phone/open-api/apps/paths/~1cloudphone~1app~1restart/post.md)

### Stop App

 - [POST /cloudphone/app/stop](https://guide.morelogin.com/api-reference/cloud-phone/open-api/apps/paths/~1cloudphone~1app~1stop/post.md)

### Uninstall App

 - [POST /cloudphone/app/uninstall](https://guide.morelogin.com/api-reference/cloud-phone/open-api/apps/paths/~1cloudphone~1app~1uninstall/post.md)

### Enable app ROOT

 - [POST /cloudphone/app/openRoot](https://guide.morelogin.com/api-reference/cloud-phone/open-api/apps/paths/~1cloudphone~1app~1openroot/post.md): Enable ROOT permission for a specific app package on a single cloud phone.

### Configure App Accessibility Hiding

 - [POST /cloudphone/app/setHideAccessibilityApp](https://guide.morelogin.com/api-reference/cloud-phone/open-api/apps/paths/~1cloudphone~1app~1sethideaccessibilityapp/post.md): Supports only Android 13,Android 14 and Android15A

## Schedules

### List Market Templates

 - [POST /cloudphone/rpa/template/market/page](https://guide.morelogin.com/api-reference/cloud-phone/open-api/schedules/paths/~1cloudphone~1rpa~1template~1market~1page/post.md): Query Schedules market template, template name supports fuzzy query

### List Personal Templates

 - [POST /cloudphone/rpa/template/personal/page](https://guide.morelogin.com/api-reference/cloud-phone/open-api/schedules/paths/~1cloudphone~1rpa~1template~1personal~1page/post.md): Query Schedules market template, template name supports fuzzy query

### List RPA Schedules

 - [POST /cloudphone/rpa/task/page](https://guide.morelogin.com/api-reference/cloud-phone/open-api/schedules/paths/~1cloudphone~1rpa~1task~1page/post.md)

### Create One-Time RPA Schedule

 - [POST /cloudphone/rpa/onceTask/save](https://guide.morelogin.com/api-reference/cloud-phone/open-api/schedules/paths/~1cloudphone~1rpa~1oncetask~1save/post.md): Save cloud phone once scheduled task

templateParameter Parameter Specification
 1. __Parameter Source__
Parameter keys must be extracted from the parameter field returned by the following APIs:
- Get market template pages
- Get Personal template pages
2.  __Data Structure__
- Submit parameters in JSON object format: {"key1": "value1", "key2": "value2"}
- Final parameter values must be deserialized according to business logic before use
3. __Common Type Parameters__
For the following parameter types, pass values directly in the corresponding format:
- string: {"name": "John"}
- decimal / number: {"amount": 100.50}
- boolean: {"enabled": true}
4. __Media Type Parameters__
For media parameters such as image (pic) or video (video), in addition to basic information, a fixed key "__Extra__" must be included. Example format:
json
{
    "__Extra__": {
        "pic": {
            "name": "pic_name",
            "size": 204800
        },
        "video": {
            "name": "video_name",
            "size": 204800000
        }
    },
    "pic": "https://get.morelogin.com/prod/cloudPhoneTaskVideo/1556061681934880/1c62314c7e2b4d298abe8d5452d7c050/test.png",
    "video": "https://get.morelogin.com/pre/cloudPhoneTaskVideo/1542431036481556/4c4fed83685345ae8f1505fbe0c2f123/baby.mp4"
}

5. __Parameter Configuration Example__
The following example demonstrates how to configure the templateParameter parameter when saving a plan using a market template:
- __Step 1: Retrieve Template Parameters__
Call the Market Template API:
POST /cloudphone/rpa/template/market/page
Extract the parameter field from the response, for example:

json
"parameter": "{\"videoDownloadUrl\":{\"type\":\"video\",\"extra\":{\"name\":\"Select Video\",\"type\":\"video\",\"required\":true,\"defaultValue\":{\"enabled\":false},\"index\":1,\"sizeLimit\":{\"value\":200,\"unit\":\"MB\"},\"formatType\":[\"mp4\",\"mov\"]}},\"videoDescription\":{\"type\":\"string\",\"extra\":{\"name\":\"Video Caption\",\"type\":\"string\",\"required\":false,\"charValid\":{\"enabled\":true,\"value\":1000},\"multiline\":{\"enabled\":true,\"value\":3},\"defaultValue\":{\"enabled\":false},\"index\":2}},\"coverUrl\":{\"type\":\"image\",\"extra\":{\"name\":\"Cover Image\",\"type\":\"image\",\"required\":false,\"defaultValue\":{\"enabled\":false},\"index\":3,\"sizeLimit\":{\"value\":5,\"unit\":\"MB\"},\"formatType\":[\"jpg\",\"png\",\"jpeg\"]}},\"enableAIGC\":{\"type\":\"boolean\",\"extra\":{\"name\":\"AI Label\",\"type\":\"boolean\",\"required\":false,\"defaultValue\":{\"enabled\":false},\"index\":4}},\"productId\":{\"type\":\"string\",\"extra\":{\"name\":\"Product ID\",\"type\":\"string\",\"required\":false,\"charValid\":{\"enabled\":true,\"value\":50},\"placeholder\":\"Product ID only supports digits, with a maximum of 50 characters.\",\"defaultValue\":{\"enabled\":false},\"index\":5}},\"productTitle\":{\"type\":\"string\",\"extra\":{\"name\":\"Product Title\",\"type\":\"string\",\"required\":false,\"charValid\":{\"enabled\":true,\"value\":30},\"defaultValue\":{\"enabled\":false},\"index\":6}},\"getLeads\":{\"type\":\"boolean\",\"extra\":{\"name\":\"Get Leads\",\"type\":\"boolean\",\"required\":false,\"defaultValue\":{\"enabled\":false},\"index\":7}},\"comment\":{\"type\":\"string\",\"extra\":{\"name\":\"Comment\",\"type\":\"string\",\"required\":false,\"charValid\":{\"enabled\":true,\"value\":200},\"multiline\":{\"enabled\":true,\"value\":3},\"defaultValue\":{\"enabled\":false},\"index\":8}}}"


- __Step 2: Build the Parameter JSON__
Construct the JSON object according to the parameter requirements:
json
{
  "__Extra__": {
    "videoDownloadUrl": {
      "name": "video_name.mp4",
      "size": 204800000
    }
  },
  "videoDownloadUrl": "https://get.morelogin.com/pre/cloudPhoneTaskVideo/1542431036481556/4c4fed83685345ae8f1505fbe0c2f123/baby.mp4"
}

- __Step 3: Escape the JSON String__
Convert the JSON object into an escaped string format:
json
"{\"__Extra__\": {\"videoDownloadUrl\": {\"name\": \"video_name.mp4\",\"size\": 204800000}},\"videoDownloadUrl\": \"https://get.morelogin.com/pre/cloudPhoneTaskVideo/1542431036481556/4c4fed83685345ae8f1505fbe0c2f123/baby.mp4\"}"

- __Step 4: API Call__
Pass the escaped string as the value of the templateParameter parameter to the target API.

### Cancel RPA Schedule

 - [POST /cloudphone/rpa/task/cancel](https://guide.morelogin.com/api-reference/cloud-phone/open-api/schedules/paths/~1cloudphone~1rpa~1task~1cancel/post.md)

### List Task Execution Records

 - [POST /cloudphone/rpa/subTask/page](https://guide.morelogin.com/api-reference/cloud-phone/open-api/schedules/paths/~1cloudphone~1rpa~1subtask~1page/post.md): Query Schedules market template, template name supports fuzzy query

### Get Task Execution Details

 - [POST /cloudphone/rpa/subTask/detail/{id}](https://guide.morelogin.com/api-reference/cloud-phone/open-api/schedules/paths/~1cloudphone~1rpa~1subtask~1detail~1%7Bid%7D/post.md): Query Schedules market template, template name supports fuzzy query

### Cancel Task Execution

 - [POST /cloudphone/rpa/subTask/cancel/{id}](https://guide.morelogin.com/api-reference/cloud-phone/open-api/schedules/paths/~1cloudphone~1rpa~1subtask~1cancel~1%7Bid%7D/post.md)

## Touch

### Touch - Click

 - [POST /cloudphone/touch/click](https://guide.morelogin.com/api-reference/cloud-phone/open-api/touch/touchclick.md): Simulate a single tap on the cloud phone screen at the specified coordinates.
The coordinate system uses the top-left corner of the screen as the origin (0, 0), with the X-axis extending to the right and the Y-axis extending downward.

### Touch - Double Click

 - [POST /cloudphone/touch/doubleClick](https://guide.morelogin.com/api-reference/cloud-phone/open-api/touch/touchdoubleclick.md): Simulate a double tap on the cloud phone screen at the specified coordinates.
The coordinate system uses the top-left corner of the screen as the origin (0, 0), with the X-axis extending to the right and the Y-axis extending downward.

### Touch - Long Press

 - [POST /cloudphone/touch/longClick](https://guide.morelogin.com/api-reference/cloud-phone/open-api/touch/touchlongclick.md): Simulate a long press on the cloud phone screen at the specified coordinates.
Use the duration parameter to customize how long the press is held (in milliseconds). If omitted, the default duration is used.
The coordinate system uses the top-left corner of the screen as the origin (0, 0), with the X-axis extending to the right and the Y-axis extending downward.

### Touch - Swipe

 - [POST /cloudphone/touch/swipe](https://guide.morelogin.com/api-reference/cloud-phone/open-api/touch/touchswipe.md): Simulate a finger swipe from the start coordinates to the end coordinates.
Use the duration parameter to control the swipe speed (in milliseconds). A larger value results in a slower swipe.
The coordinate system uses the top-left corner of the screen as the origin (0, 0), with the X-axis extending to the right and the Y-axis extending downward.

### Touch - Drag

 - [POST /cloudphone/touch/drag](https://guide.morelogin.com/api-reference/cloud-phone/open-api/touch/touchdrag.md): Simulate a finger drag from the start coordinates to the end coordinates. Similar to swipe, but drag is typically used for dragging icons, UI elements, etc.
Use the duration parameter to control the drag speed (in milliseconds). A larger value results in a slower drag.
The coordinate system uses the top-left corner of the screen as the origin (0, 0), with the X-axis extending to the right and the Y-axis extending downward.

