BROWSE DOCUMENTATION
Documentation / AccountList

AccountList

Return the names of accounts currently held by the manager.

Overview

AccountList reads the manager's in-memory account keys, sorts them, and returns the names plus a count. It does not return cookies or other account credentials.


Usage

Text
AccountList

With password protection enabled, send AUTH <password> | AccountList.


Complete Python example

Python
import asyncio
import websockets
import json

URI = "ws://localhost:8765"

async def main():
    async with websockets.connect(URI) as ws:
        print("Connected to WebSocket server")

        await ws.send("AccountList")

        response = await ws.recv()
        print(json.loads(response))

if __name__ == "__main__":
    asyncio.run(main())

Example response

JSON
{
  "ok": true,
  "result": {
    "action": "AccountList",
    "accounts": ["Main", "Secondary"],
    "count": 2
  }
}