> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gbox.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get connect address



## OpenAPI

````yaml get /boxes/{boxId}/android/connect-address
openapi: 3.0.0
info:
  title: GBOX Open API
  description: GBOX Open API Documentation
  version: '1.0'
  contact: {}
servers:
  - url: https://gbox.ai/api/v1
    description: Production Server
security: []
tags: []
paths:
  /boxes/{boxId}/android/connect-address:
    get:
      tags:
        - Android
      summary: Get connect address
      operationId: AndroidController_getAndroidConnectAddress
      parameters:
        - name: boxId
          required: true
          in: path
          description: Box ID
          schema:
            example: c9bdc193-b54b-4ddb-a035-5ac0c598d32d
            type: string
      responses:
        '200':
          description: Android connect address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AndroidConnectAddress'
      security:
        - bearer: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            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" });

              // Get Android connect address for ADB connection
              const connectAddress = await box.getConnectAddress();

              console.log(`Android Connect Address: ${JSON.stringify(connectAddress, null, 2)}`);
              console.log(`You can connect using: adb connect ${connectAddress.adb}`);
            }

            main();
        - lang: Python
          source: |-
            import os
            from gbox_sdk import GboxSDK

            def main():
                gbox_sdk = GboxSDK(api_key=os.environ["GBOX_API_KEY"])

                # Create Android box
                box = gbox_sdk.create(type="android")

                # Get Android connect address for ADB connection
                connect_address = box.get_connect_address()

                print(f"Android Connect Address: {connect_address}")
                print(f"You can connect using: adb connect {connect_address['adb']}")

            if __name__ == "__main__":
                main()
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/gbox/gbox-sdk-go\"\n)\n\nfunc main() {\n\tgboxSDK := gbox.NewGboxSDK(os.Getenv(\"GBOX_API_KEY\"))\n\n\t// Create Android box\n\tbox, err := gboxSDK.Create(context.Background(), gbox.CreateRequest{Type: \"android\"})\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to create box: %v\", err)\n\t}\n\n\t// Get Android connect address for ADB connection\n\tconnectAddress, err := box.GetConnectAddress(context.Background())\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to get Android connect address: %v\", err)\n\t}\n\n\tfmt.Printf(\"Android Connect Address: %v\\n\", connectAddress)\n\tfmt.Printf(\"You can connect using: adb connect %s\\n\", connectAddress.Adb)\n}"
components:
  schemas:
    AndroidConnectAddress:
      type: object
      properties:
        adb:
          type: string
          description: >-
            Android adb connect address. use `adb connect <adbConnectAddress>`
            to connect to the Android device
          example: adb.gbox.cloud:5555
      title: Android Connect Address
      description: Android connection information
      required:
        - adb
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: >-
        Enter your API Key in the format: Bearer <token>. Get it from
        https://gbox.ai

````