Learn how to query an update's viewers using the platform API
Within an update, users can reply and react, attach files, pin important messages to the top, and see who has viewed the conversation.
Queries
You can use the viewers query to retrieve an update's viewer information via the API.
- Required scope:
updates:read - Returns an array containing metadata about one or a collection of an update's viewers
- Must be nested within an
updatesquery; can't be queried directly at the root
query {
updates {
viewers {
user_id
medium
user {
name
}
}
}
}Arguments
You can use the following arguments to reduce the number of results returned in your viewers query.
| Argument | Description |
|---|---|
limit Int | The number of updates to return. The default is 100. |
page Int | The page number to get. Starts at 1. |
Fields
You can use the following fields to specify what information your viewers query will return.
Field | Description | Possible Values |
|---|---|---|
medium | The channel that the viewers saw the update from. |
|
user | The user who viewed the update. | |
user_id | The unique identifier of the user who viewed the update. |
