Usage Notes

Updated by MoreLogin

1. Function Overview

The API function can help you programmatically perform basic functions such as quickly creating a cloud phone profile, start it or stop, and so on. It can also be used to debug or remotely control the cloud phone through ADB mode.

2. How to use

2.1 Open MoreLogin client to get the API interface.

2.2 Confirm the interface status, API ID and API Key through "Profile"->"API".

2.3 Check the interface status in the API page as "Success", the current version of API interface address:  http://127.0.0.1:40000, the port number is based on the address you see in the settings.

2.4 Configure the "return address" to receive information about API operations. The current callback scenario is: successful start the cloud phone profile.

  • Cloud Phone Start Success Return Data
{'messageId': 'c3wOvh6d7oFb2A9_1t4Gq', 'type': 'CloudPhoneStatusMessage', 'event': 'CloudPhoneApi', 'createTime': '1713232462697', 'data': {'envId': '1565487615222069', 'status': 'CheckProxy', 'errorCode': 0, 'errorMsg': ''}, 'apiId': '1564558194164463'}

{'messageId': 'xDO1OZ2xyi8r00hw0eE6S', 'type': 'CloudPhoneStatusMessage', 'event': 'CloudPhoneApi', 'createTime': '1713232465341', 'data': {'envId': '1565487615222069', 'status': 'CheckProxySuccess', 'errorCode': 0, 'errorMsg': ''}, 'apiId': '1564558194164463'}

{'messageId': '1InM-7mJAbXIz3XJMrxbn', 'type': 'CloudPhoneStatusMessage', 'event': 'CloudPhoneApi', 'createTime': '1713232580946', 'data': {'envId': '1565487615222069', 'status': 'BootSuccess', 'errorCode': 0, 'errorMsg': ''}, 'apiId': '1564558194164463'}

3. Unterface-free service

MoreLogin supports headless startup of interfaceless services to operate the Local API.

  • "headless" is the parameter to start the headless service.
  • Make sure you have your CMD or Terminal open in the MoreLogin home directory - installation directory (MoreLogin/MoreLogin Global).
  • Command Line Startup

The supported parameters to pass when starting the interfaceless service are:

Parameter

Required

Description

--headless

YES

Value of ture refers to an interface-less service

--api-port

YES

Specified Local API service port

MoreLogin Global:
Windows: start /WAIT MoreLogin.exe --headless=true --port=51473
MacOS: "/Applications/MoreLogin.app/Contents/MacOS/MoreLogin" --headless=true --port=40008

4. Cautions

  • There is a request frequency limit for interfaces, with a maximum of 60 requests per minute per interface.
  • It is necessary to update the system to version 2.9.0 and above.


How did we do?