payments.applyGiftCode
Apply a Telegram Premium giftcode »
func (c *Client) PaymentsApplyGiftCode(ctx context.Context, slug string) (UpdatesClass, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.PaymentsApplyGiftCode(ctx, slug)
if err != nil {
return err
}
_ = res // UpdatesClass
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Slug | string | yes | The code to apply |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | GIFT_SLUG_EXPIRED | The specified gift slug has expired. |
| 400 | GIFT_SLUG_INVALID | The specified slug is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
payments.applyGiftCode#f6e26854