Use the ably spaces locations subscribe command to subscribe to location updates for members in a space.
Synopsis
ably spaces locations subscribe <space-name> [options]Arguments
space-name Required
Required
The name of the space to subscribe to location updates in.
Options
--duration | -D
The duration in seconds to subscribe for before automatically unsubscribing.
--client-id
A client ID to use when subscribing.
--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
Subscribe to location updates in a space:
ably spaces locations subscribe my-spaceSubscribe for a specific duration:
ably spaces locations subscribe my-space --duration 60Subscribe to location updates in JSON format:
ably spaces locations subscribe my-space --jsonSubscribe to location updates in formatted JSON:
ably spaces locations subscribe my-space --pretty-jsonSee also
- Spaces — Explore all
ably spacescommands. - CLI reference — Full list of available commands.