Skip to content

Touch - Click

Request

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.

Bodyapplication/jsonrequired
idinteger, (int64)required

Cloud Phone ID

Example:1558968155668507
posArray of integers, = 2 itemsrequired

Tap coordinates [x, y]. The coordinate system uses the top-left corner as origin (0, 0).

Example:
[ 540, 960 ]
durationinteger

Press duration in milliseconds (used for long press). If omitted, the default duration is used.

Example:2000
POST
/api/cloudphone/touch/click
curl -i -X POST \
  http://127.0.0.1:40000/api/cloudphone/touch/click \
  -H 'Content-Type: application/json' \
  -d '{
    "id": 1558968155668507,
    "pos": [
      540,
      960
    ]
  }'

Responses

Operation successful

Bodyapplication/json
codeinteger

Status code, 0 means success

Example:0
msgstring

Response message

Example:"success"
dataobject
Response
{ "code": 0, "msg": "success", "data": { "status": "finish" } }