Layer 220
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 |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| 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
BoolPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
Gogram Example
// PaymentsChangeStarsSubscription - using Params struct result, err := client.PaymentsChangeStarsSubscription(&tg.PaymentsChangeStarsSubscriptionParams{ Peer: &tg.InputPeerUser{UserID: int64(123456789)}, SubscriptionId: "...", // Optional fields: // Canceled: true, }) if err != nil { // handle error } // result is *tg.Bool