Skip to main content

payments.getStarsRevenueAdsAccountUrl

Returns a URL for a Telegram Ad platform account that can be used to set up advertisements for channel/bot in peer, paid using the Telegram Stars owned by the specified peer, see here » for more info.

func (c *Client) PaymentsGetStarsRevenueAdsAccountURL(ctx context.Context, peer InputPeerClass) (*PaymentsStarsRevenueAdsAccountURL, error)

Calling this method

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

res, err := api.PaymentsGetStarsRevenueAdsAccountURL(ctx, peer)
if err != nil {
return err
}
_ = res // *PaymentsStarsRevenueAdsAccountURL
return nil
})

Parameters

NameTypeRequiredDescription
PeerInputPeerClassyesChannel or bot that owns the stars.

Returns

*PaymentsStarsRevenueAdsAccountURL

Possible errors

CodeTypeDescription
403CHAT_WRITE_FORBIDDENYou can't write in this chat.
400PEER_ID_INVALIDThe provided peer id is invalid.

References