payments.changeStarsSubscription
Activate or deactivate a Telegram Star subscription ».
func (c *Client) PaymentsChangeStarsSubscription(ctx context.Context, request *PaymentsChangeStarsSubscriptionRequest) (bool, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.PaymentsChangeStarsSubscription(ctx, &tg.PaymentsChangeStarsSubscriptionRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Peer | InputPeerClass | yes | Always pass inputPeerSelf. |
SubscriptionID | string | yes | ID of the subscription. |
Canceled | bool | — | Whether to cancel or reactivate the subscription. |
Returns
bool
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
payments.changeStarsSubscription#c7770878