Get presence of a channel

GET /channels/{channel_id}/presence

Get presence on a channel

Query parameters

Responses

  • OK

    Hide headers attributes Show headers attributes
    • x-ably-serverid string Required

      The ID for the server communicated with.

    Hide response attributes Show response attributes array[object]
    • id string

      Unique ID assigned by Ably to this presence update.

    • action string

      The event signified by a PresenceMessage.

      Values are ABSENT, PRESENT, ENTER, LEAVE, or UPDATE.

    • data string

      The presence update payload, if provided.

    • clientId string

      The client ID of the publisher of this presence update.

    • The connection ID of the publisher of this presence update.

    • timestamp integer(int64)

      Timestamp when the presence update was received by Ably, as milliseconds since the epoch.

    • encoding string

      This will typically be empty as all presence updates received from Ably are automatically decoded client-side using this value. However, if the message encoding cannot be processed, this attribute will contain the remaining transformations not applied to the data payload.

    • extras object

      Extras object. Currently only allows for push extra.

      Hide extras attribute Show extras attribute object
      • push object
        Hide push attributes Show push attributes object
        • data string
        • Hide notification attributes Show notification attributes object
          • title string

            Title to display at the notification.

          • body string

            Text below title on the expanded notification.

          • icon string

            Platform-specific icon for the notification.

          • sound string

            Platform-specific sound for the notification.

          • Platform-specific, used to group notifications together.

        • apns object

          Extends and overrides generic values when delivering via APNs. See examples

          Hide apns attribute Show apns attribute object
          • Hide notification attributes Show notification attributes object
            • title string

              Title to display at the notification.

            • body string

              Text below title on the expanded notification.

            • icon string

              Platform-specific icon for the notification.

            • sound string

              Platform-specific sound for the notification.

            • Platform-specific, used to group notifications together.

        • fcm object

          Extends and overrides generic values when delivering via GCM/FCM. See examples

          Hide fcm attribute Show fcm attribute object
          • Hide notification attributes Show notification attributes object
            • title string

              Title to display at the notification.

            • body string

              Text below title on the expanded notification.

            • icon string

              Platform-specific icon for the notification.

            • sound string

              Platform-specific sound for the notification.

            • Platform-specific, used to group notifications together.

        • web object

          Extends and overrides generic values when delivering via web. See examples

          Hide web attribute Show web attribute object
          • Hide notification attributes Show notification attributes object
            • title string

              Title to display at the notification.

            • body string

              Text below title on the expanded notification.

            • icon string

              Platform-specific icon for the notification.

            • sound string

              Platform-specific sound for the notification.

            • Platform-specific, used to group notifications together.

  • Error

    Hide headers attributes Show headers attributes
    Hide response attributes Show response attributes object
GET /channels/{channel_id}/presence
curl \
 -X GET https://rest.ably.io/channels/{channel_id}/presence
Response examples (200)
# Headers
link: string
x-ably-serverid: string

# Payload
[
  {
    "id": "string",
    "action": "ABSENT",
    "data": "string",
    "clientId": "string",
    "connectionId": "string",
    "timestamp": 42,
    "encoding": "string",
    "extras": {
      "push": {
        "data": "string",
        "notification": {
          "title": "string",
          "body": "string",
          "icon": "string",
          "sound": "string",
          "collapseKey": "string"
        },
        "apns": {
          "notification": {
            "title": "string",
            "body": "string",
            "icon": "string",
            "sound": "string",
            "collapseKey": "string"
          }
        },
        "fcm": {
          "notification": {
            "title": "string",
            "body": "string",
            "icon": "string",
            "sound": "string",
            "collapseKey": "string"
          }
        },
        "web": {
          "notification": {
            "title": "string",
            "body": "string",
            "icon": "string",
            "sound": "string",
            "collapseKey": "string"
          }
        }
      }
    }
  }
]
Response examples (200)
# Headers
link: string
x-ably-serverid: string

# Payload
[
  {
    "id": "string",
    "action": "ABSENT",
    "data": "string",
    "clientId": "string",
    "connectionId": "string",
    "timestamp": 42,
    "encoding": "string",
    "extras": {
      "push": {
        "data": "string",
        "notification": {
          "title": "string",
          "body": "string",
          "icon": "string",
          "sound": "string",
          "collapseKey": "string"
        },
        "apns": {
          "notification": {
            "title": "string",
            "body": "string",
            "icon": "string",
            "sound": "string",
            "collapseKey": "string"
          }
        },
        "fcm": {
          "notification": {
            "title": "string",
            "body": "string",
            "icon": "string",
            "sound": "string",
            "collapseKey": "string"
          }
        },
        "web": {
          "notification": {
            "title": "string",
            "body": "string",
            "icon": "string",
            "sound": "string",
            "collapseKey": "string"
          }
        }
      }
    }
  }
]
Response examples (default)
# Headers
x-ably-errorcode: 42
x-ably-errormessage: string
x-ably-serverid: string

# Payload
{
  "message": "string",
  "code": 42,
  "statusCode": 42,
  "href": "string",
  "serverId": "string"
}
Response examples (default)
# Headers
x-ably-errorcode: 42
x-ably-errormessage: string
x-ably-serverid: string

# Payload
{
  "message": "string",
  "code": 42,
  "statusCode": 42,
  "href": "string",
  "serverId": "string"
}