Skip to content
On this page

Feed API ​

EndpointMethodDescription
feed:listGlobalFeedwebsocketList global feed

List global feed ​

Method: websocket

Endpoint: feed:listGlobalFeed

Request:

{
    "data": {
        "feedSource": string  // one of: 'networkGlobalFeed:{networkId}' (default), 'networkUserFeed:{networkId}:{userId}'
        "filter": string  // optional filter: 'following' (posts from users I follow), 'friends' (posts from my friends)
        "cursor": string  // pagination cursor, if not set, the most recent items will be returned
        "limit": int  // number of items to return
    }
    "event": { "id": string, "date": timestamp }
}

Response:

{
    "data": {
        "messages": [{
            "channelId": string
            "bucketId": string
            "messageId": string
            "authorId": string
            "agentId": string
            "networkId": string
            "created": timestamp
            "updated": timestamp
            "messageType": int  // 0 - my, 1 - user, 3 - system, 4 - system JSON, 6 - request JSON, 7 - endorsement JSON, 8 - activity JSON, 9 - card JSON, 100-199 - AI messages
            "messageBody": string
            "messageTitle": string
            "isBlocked": bool
            "isDeleted": bool
            "attachments": [{
                "resourceId": string
                "fileName": string
                "fileSize": int
                "contentType": string
                "durationFloat": float
                "updated": timestamp
                "encryptionVersion": string  // encryption version, like 'verus.v1'
                "encryptionEpoch": int  // epoch defines key bundle that was used for encryption
                "encryptionEpk": string  // ephemeral public key that should be used to decrypt cypher data
            }]
            "replyMessage": {
                "channelId": string
                "messageId": string
                "authorId": string
                "created": timestamp
                "messageType": int
                "messageBody": string
                "attachments": [{
                    "resourceId": string
                    "fileName": string
                    "fileSize": int
                    "contentType": string
                    "durationFloat": float
                    "updated": timestamp
                    "encryptionVersion": string  // encryption version, like 'verus.v1'
                    "encryptionEpoch": int  // epoch defines key bundle that was used for encryption
                    "encryptionEpk": string  // ephemeral public key that should be used to decrypt cypher data
                }]
                "encryptionVersion": string  // encryption version, like 'verus.v1'
                "encryptionEpoch": int  // epoch defines key bundle that was used for encryption
                "encryptionEpk": string  // ephemeral public key that should be used to decrypt cypher data
            }
            "forwardMessage": {
                "channelId": string
                "messageId": string
                "authorId": string
                "created": timestamp
                "messageType": int
                "messageBody": string
                "attachments": [{
                    "resourceId": string
                    "fileName": string
                    "fileSize": int
                    "contentType": string
                    "durationFloat": float
                    "updated": timestamp
                    "encryptionVersion": string  // encryption version, like 'verus.v1'
                    "encryptionEpoch": int  // epoch defines key bundle that was used for encryption
                    "encryptionEpk": string  // ephemeral public key that should be used to decrypt cypher data
                }]
                "encryptionVersion": string  // encryption version, like 'verus.v1'
                "encryptionEpoch": int  // epoch defines key bundle that was used for encryption
                "encryptionEpk": string  // ephemeral public key that should be used to decrypt cypher data
            }
            "subChannelPath": string
            "subChannelTitles": [ string ]
            "options": [ string ]
            "customParams": map[string]{ custom structure }
            "reactions": {
                "counters": [{  // counter per reaction, in descending order
                    "emoji": string
                    "count": int
                }]
                "userEmoji": string  // user's emoji reaction to the message
            }
            "pollId": string
            "userPoll": {
                "poll": {  // channel's poll
                    "id": string
                    "channelId": string  // the channel the poll is in
                    "question": string  // question/description of the poll
                    "isMultiSelect": bool  // allow the users to select multiple choices
                    "isAnonymous": bool  // can users see who voted for what
                    "created": timestamp  // the time when poll was created
                    "closingTime": timestamp  // users cannot vote after the closing time, defaults to one day
                    "options": [ string ]  // list of options which the channel users vote for
                    "voteCounters": [ int ]  // calculated number of votes per option respectively
                }
                "vote": {  // user's vote in the poll'
                    "pollId": string
                    "userId": string
                    "options": [ string ]  // list of options the user voted for
                }
            }
            "threadChannelId": string
            "threadMessageCount": int
            "viewCount": int
            "upVoteCount": int
            "downVoteCount": int
            "encryptionVersion": string  // encryption version, like 'verus.v1'
            "encryptionEpoch": int  // epoch defines key bundle that was used for encryption
            "encryptionEpk": string  // ephemeral public key that should be used to decrypt cypher data
        }]
        "nextCursor": string
        "hasMore": bool
        "userVotes": map[string]int  // user votes per message id (if set)
    }
    "error": { "status": bool, "code": int, "message": string }
}