Layer 224
PaymentsChangeStarsSubscription
Activate or deactivate a Telegram Star subscription.
method
Users
payments.changeStarsSubscription#c7770878 flags:# peer:InputPeer subscription_id:string canceled:flags.0?Bool = Bool;
Parameters
| Name | Type | Description |
|---|---|---|
| Peer | InputPeer | Always pass input Peer Self. |
| SubscriptionId | string | ID of the subscription. |
| Canceled | flags.0?Bool | Whether to cancel or reactivate the subscription. |
Returns
BoolGogram Example
// PaymentsChangeStarsSubscription - using Params struct result, err := client.PaymentsChangeStarsSubscription(&tg.PaymentsChangeStarsSubscriptionParams{ Peer: &tg.InputPeerUser{UserID: int64(777000)}, SubscriptionId: "Hello, World!", // Optional fields: // Canceled: true, }) if err != nil { // handle error } // result is *tg.Bool
Possible Errors
| Code | Type | Description |
|---|---|---|
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |