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

# Get Container Details

> Retrieve container connection details including subdomain and secure access token using the Python SDK.

The `get_container_details()` method provides low-level connection information for the currently active sandbox container. It returns a dictionary containing the **container subdomain** and **playground access token**, which are used internally to establish and maintain a secure WebSocket connection between your client and Fermion’s backend infrastructure.

***

### `get_container_details() -> Optional[ContainerDetails]`

**Description:**\
Returns container connection details, including the subdomain and secure access token.\
If no sandbox is currently connected, returns `None`.

***

**Parameters:**\
*None*

***

**Returns:**
`ContainerDetails` object or `None`. The `ContainerDetails` object has the following attributes:

* `subdomain: str` - Container subdomain
* `playground_container_access_token: str` - Secure access token

**Example**

```python theme={null}
import asyncio
from fermion_sandbox import Sandbox

async def main():
    sandbox = Sandbox(api_key="your-api-key")
    await sandbox.create(should_backup_filesystem=False)

    details = sandbox.get_container_details()

    if details:
        print("Subdomain:", details.subdomain)
        print("Access Token:", details.playground_container_access_token)
    else:
        print("No active container connection.")

asyncio.run(main())
```

<Warning>
  The access token is sensitive. Do not expose it in logs or UI.
</Warning>
