Skip to main content
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
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())
The access token is sensitive. Do not expose it in logs or UI.