payments.getStarsGiftOptions
Obtain a list of Telegram Stars gift options » as starsGiftOption constructors.
func (c *Client) PaymentsGetStarsGiftOptions(ctx context.Context, request *PaymentsGetStarsGiftOptionsRequest) ([]StarsGiftOption, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.PaymentsGetStarsGiftOptions(ctx, &tg.PaymentsGetStarsGiftOptionsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // []StarsGiftOption
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
UserID | InputUserClass | — | Receiver of the gift (optional). |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | INPUT_USER_DEACTIVATED | The specified user was deleted. |
| 400 | USER_GIFT_UNAVAILABLE | Gifts are not available in the current region (stars_gifts_enabled is equal to false). |
| 400 | USER_ID_INVALID | The provided user ID is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
payments.getStarsGiftOptions#d3c96bc8