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() {
// Create an Android box
const box = await gboxSDK.create({ type: "android" });
// Get Android pkg details by package name
const androidPkgInfo = await box.pkg.getInfo("com.android.chrome"); // package name
console.log(`Android Pkg: ${JSON.stringify(androidPkgInfo, null, 2)}`);
// Get pkg operator for interaction capabilities
const androidPkg = await box.pkg.get("com.android.chrome");
// Open the pkg
await androidPkg.open();
}
main();import os
from gbox_sdk import GboxSDK
def main():
gbox_sdk = GboxSDK(api_key=os.environ["GBOX_API_KEY"]) # This is the default and can be omitted
# Create an Android box
box = gbox_sdk.create(type="android")
# Get Android pkg details by package name
android_pkg_info = box.pkg.get_info("com.android.chrome") # package name
print(f"Android Pkg: {android_pkg_info}")
# Get pkg operator for interaction capabilities
android_pkg = box.pkg.get("com.android.chrome") # package name
# Open the pkg
android_pkg.open()
if __name__ == "__main__":
main()curl --request GET \
--url https://gbox.ai/api/v1/boxes/{boxId}/android/packages/{packageName} \
--header 'Authorization: Bearer <token>'{
"name": "Google Voice",
"packageName": "com.google.android.apps.googlevoice",
"apkPath": "/data/app/com.google.android.apps.googlevoice-1/base.apk",
"version": "1.0.0",
"pkgType": "thirdParty",
"isRunning": false
}Android
Get pkg
GET
/
boxes
/
{boxId}
/
android
/
packages
/
{packageName}
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() {
// Create an Android box
const box = await gboxSDK.create({ type: "android" });
// Get Android pkg details by package name
const androidPkgInfo = await box.pkg.getInfo("com.android.chrome"); // package name
console.log(`Android Pkg: ${JSON.stringify(androidPkgInfo, null, 2)}`);
// Get pkg operator for interaction capabilities
const androidPkg = await box.pkg.get("com.android.chrome");
// Open the pkg
await androidPkg.open();
}
main();import os
from gbox_sdk import GboxSDK
def main():
gbox_sdk = GboxSDK(api_key=os.environ["GBOX_API_KEY"]) # This is the default and can be omitted
# Create an Android box
box = gbox_sdk.create(type="android")
# Get Android pkg details by package name
android_pkg_info = box.pkg.get_info("com.android.chrome") # package name
print(f"Android Pkg: {android_pkg_info}")
# Get pkg operator for interaction capabilities
android_pkg = box.pkg.get("com.android.chrome") # package name
# Open the pkg
android_pkg.open()
if __name__ == "__main__":
main()curl --request GET \
--url https://gbox.ai/api/v1/boxes/{boxId}/android/packages/{packageName} \
--header 'Authorization: Bearer <token>'{
"name": "Google Voice",
"packageName": "com.google.android.apps.googlevoice",
"apkPath": "/data/app/com.google.android.apps.googlevoice-1/base.apk",
"version": "1.0.0",
"pkgType": "thirdParty",
"isRunning": false
}Authorizations
Enter your API Key in the format: Bearer . Get it from https://gbox.ai
Path Parameters
Response
200 - application/json
Android pkg
Android pkg information
Was this page helpful?