Skip to main content

stories.getStoryViewsList

Obtain the list of users that have viewed a specific story we posted

func (c *Client) StoriesGetStoryViewsList(ctx context.Context, request *StoriesGetStoryViewsListRequest) (*StoriesStoryViewsList, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.StoriesGetStoryViewsList(ctx, &tg.StoriesGetStoryViewsListRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *StoriesStoryViewsList
return nil
})

Parameters

NameTypeRequiredDescription
JustContactsboolWhether to only fetch view reaction/views made by our contacts
ReactionsFirstboolWhether to return storyView info about users that reacted to the story (i.e. if set, the server will first sort results by view date as usual, and then also additionally sort the list by putting storyViews with an associated reaction first in the list). Ignored if forwards_first is set.
ForwardsFirstboolIf set, returns forwards and reposts first, then reactions, then other views; otherwise returns interactions sorted just by interaction date.
PeerInputPeerClassyesPeer where the story was posted
QstringSearch for specific peers
IDintyesStory ID
OffsetstringyesOffset for pagination, obtained from stories.storyViewsList.next_offset
LimitintyesMaximum number of results to return, see pagination

Returns

*StoriesStoryViewsList

Possible errors

CodeTypeDescription
400PEER_ID_INVALIDThe provided peer id is invalid.
400STORY_ID_INVALIDThe specified story ID is invalid.

References