Skip to main content

payments.saveStarGift

Display or remove a received gift » from our profile.

func (c *Client) PaymentsSaveStarGift(ctx context.Context, request *PaymentsSaveStarGiftRequest) (bool, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.PaymentsSaveStarGift(ctx, &tg.PaymentsSaveStarGiftRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})

Parameters

NameTypeRequiredDescription
UnsaveboolIf set, hides the gift from our profile.
StargiftInputSavedStarGiftClassyesThe gift to display or remove.

Returns

bool

Possible errors

CodeTypeDescription
400MESSAGE_ID_INVALIDThe provided message id is invalid.
400SAVED_ID_EMPTYThe passed inputSavedStarGiftChat.saved_id is empty.
400STARGIFT_OWNER_INVALIDYou cannot transfer or sell a gift owned by another user.
400USER_ID_INVALIDThe provided user ID is invalid.

References