Skip to main content

stories.getStoriesByID

Obtain full info about a set of stories by their IDs.

func (c *Client) StoriesGetStoriesByID(ctx context.Context, request *StoriesGetStoriesByIDRequest) (*StoriesStories, error)

Calling this method

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

res, err := api.StoriesGetStoriesByID(ctx, &tg.StoriesGetStoriesByIDRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *StoriesStories
return nil
})

Parameters

NameTypeRequiredDescription
PeerInputPeerClassyesPeer where the stories were posted
ID[]intyesStory IDs

Returns

*StoriesStories

Possible errors

CodeTypeDescription
400CHANNEL_INVALIDThe provided channel is invalid.
400CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
400MSG_ID_INVALIDInvalid message ID provided.
400PEER_ID_INVALIDThe provided peer id is invalid.
400STORIES_NEVER_CREATEDThis peer hasn't ever posted any stories.
400STORY_ID_EMPTYYou specified no story IDs.

References