payments.checkGiftCode
Obtain information about a Telegram Premium giftcode »
func (c *Client) PaymentsCheckGiftCode(ctx context.Context, slug string) (*PaymentsCheckedGiftCode, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.PaymentsCheckGiftCode(ctx, slug)
if err != nil {
return err
}
_ = res // *PaymentsCheckedGiftCode
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Slug | string | yes | The giftcode to check |
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.checkGiftCode#8e51b4c1