GET
/
boxes
/
{boxId}
/
browser
/
tabs
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: "linux" });

  // List all browser tabs
  const tabsResult = await box.browser.listTabs();

  console.log("Browser tabs:");
  for (const tab of tabsResult.tabs) {
    console.log(`  Tab ${tab.id}: ${tab.title} - ${tab.url}`);
  }
}

main();
{
  "tabs": [
    {
      "id": "1",
      "title": "Google",
      "url": "https://www.google.com",
      "favicon": "https://www.google.com/favicon.ico",
      "active": true,
      "loading": false
    },
    {
      "id": "2",
      "title": "Bing",
      "url": "https://www.bing.com",
      "favicon": "https://www.bing.com/favicon.ico",
      "active": false,
      "loading": true
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

boxId
string
required

Box ID

Example:

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

Response

200 - application/json

Successfully retrieved list of browser tabs

List tabs