JavaScript
import Mobilerun from '@mobilerun/sdk';
const client = new Mobilerun({
apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
});
await client.devices.actions.tap('deviceId', { x: 0, y: 0 });import os
from mobilerun_sdk import Mobilerun
client = Mobilerun(
api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"), # This is the default and can be omitted
)
client.devices.actions.tap(
device_id="deviceId",
x=0,
y=0,
)package main
import (
"context"
"github.com/stainless-sdks/droidrun-cloud-go"
"github.com/stainless-sdks/droidrun-cloud-go/option"
)
func main() {
client := mobileruncloud.NewClient(
option.WithAPIKey("My API Key"),
)
err := client.Devices.Actions.Tap(
context.TODO(),
"deviceId",
mobileruncloud.DeviceActionTapParams{
X: 0,
Y: 0,
},
)
if err != nil {
panic(err.Error())
}
}mobilerun-cloud devices:actions tap \
--api-key 'My API Key' \
--device-id deviceId \
--x 0 \
--y 0curl --request POST \
--url https://api.mobilerun.ai/devices/{deviceId}/tap \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"x": 123,
"y": 123,
"stealth": false
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mobilerun.ai/devices/{deviceId}/tap",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'x' => 123,
'y' => 123,
'stealth' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api.mobilerun.ai/devices/{deviceId}/tap")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"x\": 123,\n \"y\": 123,\n \"stealth\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mobilerun.ai/devices/{deviceId}/tap")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"x\": 123,\n \"y\": 123,\n \"stealth\": false\n}"
response = http.request(request)
puts response.read_body{
"$schema": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}Navigation
Tap by coordinates
Taps the device screen at the given x/y coordinates. An optional stealth flag routes the tap through human-like input on devices that support it.
POST
/
devices
/
{deviceId}
/
tap
JavaScript
import Mobilerun from '@mobilerun/sdk';
const client = new Mobilerun({
apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
});
await client.devices.actions.tap('deviceId', { x: 0, y: 0 });import os
from mobilerun_sdk import Mobilerun
client = Mobilerun(
api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"), # This is the default and can be omitted
)
client.devices.actions.tap(
device_id="deviceId",
x=0,
y=0,
)package main
import (
"context"
"github.com/stainless-sdks/droidrun-cloud-go"
"github.com/stainless-sdks/droidrun-cloud-go/option"
)
func main() {
client := mobileruncloud.NewClient(
option.WithAPIKey("My API Key"),
)
err := client.Devices.Actions.Tap(
context.TODO(),
"deviceId",
mobileruncloud.DeviceActionTapParams{
X: 0,
Y: 0,
},
)
if err != nil {
panic(err.Error())
}
}mobilerun-cloud devices:actions tap \
--api-key 'My API Key' \
--device-id deviceId \
--x 0 \
--y 0curl --request POST \
--url https://api.mobilerun.ai/devices/{deviceId}/tap \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"x": 123,
"y": 123,
"stealth": false
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mobilerun.ai/devices/{deviceId}/tap",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'x' => 123,
'y' => 123,
'stealth' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api.mobilerun.ai/devices/{deviceId}/tap")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"x\": 123,\n \"y\": 123,\n \"stealth\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mobilerun.ai/devices/{deviceId}/tap")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"x\": 123,\n \"y\": 123,\n \"stealth\": false\n}"
response = http.request(request)
puts response.read_body{
"$schema": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank"
}Coordinates are absolute screen pixels — the same space as
boundsInScreen in the UI state response, so you can read an element’s bounds and tap the center of its box.
With stealth: true, devices that support human-like input inject the tap with human motor timing rather than a plain synthetic event.Authorizations
Bearer token via Authorization header
Headers
Required range:
x >= 0Path Parameters
Response
No Content
Was this page helpful?
⌘I