Use the ably rooms presence enter command to enter presence in a chat room and remain present until terminated.
Synopsis
ably rooms presence enter <room-name> [options]Arguments
room-name Required
The name of the chat room to enter presence in.
Options
--data
A JSON string of data to associate with the presence member.
--show-others
Display presence events from other members while present. Defaults to false.
--duration | -D
The duration in seconds to remain present before automatically leaving.
--sequence-numbers
Display sequence numbers for presence events. Defaults to false.
--client-id
A client ID to use when entering presence.
--json
Output results as compact JSON. Mutually exclusive with --pretty-json.
--pretty-json
Output results in formatted JSON. Mutually exclusive with --json.
--verbose | -v
Enable verbose logging. Can be combined with --json or --pretty-json.
Examples
Enter presence in a room:
ably rooms presence enter my-roomEnter presence with data:
ably rooms presence enter my-room --data '{"status": "online", "name": "Alice"}'Enter presence and show other members' events:
ably rooms presence enter my-room --show-othersEnter room presence for a specific duration:
ably rooms presence enter my-room --duration 30Enter room presence and output events in JSON format:
ably rooms presence enter my-room --jsonEnter room presence and output events in formatted JSON:
ably rooms presence enter my-room --pretty-jsonSee also
- Rooms — Explore all
ably roomscommands. - CLI reference — Full list of available commands.