payments.launchPrepaidGiveaway
Launch a prepaid giveaway ».
func (c *Client) PaymentsLaunchPrepaidGiveaway(ctx context.Context, request *PaymentsLaunchPrepaidGiveawayRequest) (UpdatesClass, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.PaymentsLaunchPrepaidGiveaway(ctx, &tg.PaymentsLaunchPrepaidGiveawayRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // UpdatesClass
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Peer | InputPeerClass | yes | The peer where to launch the giveaway. |
GiveawayID | int64 | yes | The prepaid giveaway ID. |
Purpose | InputStorePaymentPurposeClass | yes | Giveway parameters |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
payments.launchPrepaidGiveaway#5ff58f20