> ## 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 Session ID

> Retrieve the current sandbox session ID, or null if no active session exists.

The `getSessionId()` method returns the unique **session ID** associated with your active sandbox connection. This ID identifies the live session currently linked to your WebSocket connection.

### `getSessionId()`

**Description:**
Returns the current sandbox session ID, or null if not connected.

**Parameters:**
None

**Returns:**
`string | null` - Session ID or null

**Example:**

```typescript theme={null}
await sandbox.create({ shouldBackupFilesystem: false })
console.log(sandbox.getSessionId()) // 'session-abc123'
```

<Note>
  Session ID is different from snippet ID. Session is temporary, snippet is persistent.
</Note>

***
