Skip to main content

stories.exportStoryLink

Generate a story deep link for a specific story

func (c *Client) StoriesExportStoryLink(ctx context.Context, request *StoriesExportStoryLinkRequest) (*ExportedStoryLink, error)

Calling this method

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

res, err := api.StoriesExportStoryLink(ctx, &tg.StoriesExportStoryLinkRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *ExportedStoryLink
return nil
})

Parameters

NameTypeRequiredDescription
PeerInputPeerClassyesPeer where the story was posted
IDintyesStory ID

Returns

*ExportedStoryLink

Possible errors

CodeTypeDescription
400PEER_ID_INVALIDThe provided peer id is invalid.
400STORY_ID_EMPTYYou specified no story IDs.
400USER_PUBLIC_MISSINGCannot generate a link to stories posted by a peer without a username.

References