JavaScript
import GboxSDK from "gbox-sdk";
const gboxSDK = new GboxSDK({
apiKey: process.env["GBOX_API_KEY"] // This is the default and can be omitted
});
async function main() {
const box = await gboxSDK.create({ type: "android" });
console.log("Starting recording...");
await box.action.recording.start();
console.log("Tapping on chrome app...");
await box.action.tap({ target: "chrome app" });
console.info(`sleeping for 5 seconds...`);
await new Promise((resolve) => setTimeout(resolve, 5000));
console.log("Stopping recording...");
const result = await box.action.recording.stop();
console.log(`Download URL: ${result.presignedUrl}`);
}
main();import os
import time
from gbox_sdk import GboxSDK
gbox_sdk = GboxSDK(api_key=os.environ["GBOX_API_KEY"]) # This is the default and can be omitted
box = gbox_sdk.create(type="android")
print("Starting recording...")
box.action.recording.start()
print("Tapping on chrome app...")
box.action.tap(target="chrome app")
print("sleeping for 5 seconds...")
time.sleep(5)
print("Stopping recording...")
result = box.action.recording.stop()
print(f"Download URL: {result.presigned_url}")curl --request POST \
--url https://gbox.ai/api/v1/boxes/{boxId}/actions/recording/stop \
--header 'Authorization: Bearer <token>'{
"storageKey": "storage://gbox/recording/1234567890",
"presignedUrl": "https://gbox.ai/api/v1/boxes/1234567890/recording/1234567890"
}UI Action
Stop recording
Stop recording the box screen
POST
/
boxes
/
{boxId}
/
actions
/
recording
/
stop
JavaScript
import GboxSDK from "gbox-sdk";
const gboxSDK = new GboxSDK({
apiKey: process.env["GBOX_API_KEY"] // This is the default and can be omitted
});
async function main() {
const box = await gboxSDK.create({ type: "android" });
console.log("Starting recording...");
await box.action.recording.start();
console.log("Tapping on chrome app...");
await box.action.tap({ target: "chrome app" });
console.info(`sleeping for 5 seconds...`);
await new Promise((resolve) => setTimeout(resolve, 5000));
console.log("Stopping recording...");
const result = await box.action.recording.stop();
console.log(`Download URL: ${result.presignedUrl}`);
}
main();import os
import time
from gbox_sdk import GboxSDK
gbox_sdk = GboxSDK(api_key=os.environ["GBOX_API_KEY"]) # This is the default and can be omitted
box = gbox_sdk.create(type="android")
print("Starting recording...")
box.action.recording.start()
print("Tapping on chrome app...")
box.action.tap(target="chrome app")
print("sleeping for 5 seconds...")
time.sleep(5)
print("Stopping recording...")
result = box.action.recording.stop()
print(f"Download URL: {result.presigned_url}")curl --request POST \
--url https://gbox.ai/api/v1/boxes/{boxId}/actions/recording/stop \
--header 'Authorization: Bearer <token>'{
"storageKey": "storage://gbox/recording/1234567890",
"presignedUrl": "https://gbox.ai/api/v1/boxes/1234567890/recording/1234567890"
}Authorizations
Enter your API Key in the format: Bearer . Get it from https://gbox.ai
Response
200 - application/json
Recording stop result
Was this page helpful?