Skip to main content

payments.getStarsSubscriptions

Obtain a list of active, expired or cancelled Telegram Star subscriptions ».

func (c *Client) PaymentsGetStarsSubscriptions(ctx context.Context, request *PaymentsGetStarsSubscriptionsRequest) (*PaymentsStarsStatus, error)

Calling this method

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

res, err := api.PaymentsGetStarsSubscriptions(ctx, &tg.PaymentsGetStarsSubscriptionsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *PaymentsStarsStatus
return nil
})

Parameters

NameTypeRequiredDescription
MissingBalanceboolWhether to return only subscriptions expired due to an excessively low Telegram Star balance.
PeerInputPeerClassyesAlways pass inputPeerSelf.
OffsetstringyesOffset for pagination, taken from payments.starsStatus.subscriptions_next_offset.

Returns

*PaymentsStarsStatus

Possible errors

CodeTypeDescription
400PEER_ID_INVALIDThe provided peer id is invalid.

References