Skip to main content
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

Authorization
string
header
required

Enter your API Key in the format: Bearer . Get it from https://gbox.ai

Path Parameters

boxId
string
required

Box ID

Example:

"c9bdc193-b54b-4ddb-a035-5ac0c598d32d"

Response

200 - application/json

Recording stop result

storageKey
string
required

Storage key of the recording. Before the box is deleted, you can use this storageKey with the endpoint box/:boxId/storage/presigned-url to get a downloadable URL for the recording.

Example:

"storage://gbox/recording/1234567890"

presignedUrl
string
required

Presigned URL of the recording. This is a temporary downloadable URL with an expiration time for accessing the recording file.

Example:

"https://gbox.ai/api/v1/boxes/1234567890/recording/1234567890"