Layer 224
method Users
payments.sendStarGiftOffer#8fb86b41 flags:# peer:InputPeer slug:string price:StarsAmount duration:int random_id:long allow_paid_stars:flags.0?long = Updates;

Parameters

Name Type Description
Peer InputPeer Recipient peer
Slug string Gift slug
Price StarsAmount Gift price
Duration int Offer duration
RandomId long Random ID
AllowPaidStars flags.0?long Optional allowed paid stars

Returns

Updates

Gogram Example

// PaymentsSendStarGiftOffer - using Params struct
result, err := client.PaymentsSendStarGiftOffer(&tg.PaymentsSendStarGiftOfferParams{
    Peer: &tg.InputPeerUser{UserID: int64(777000)},
    Slug: "Hello, World!",
    Price: &tg.StarsAmount{},
    Duration: 42,
    RandomId: int64(1234567890),

    // Optional fields:
    // AllowPaidStars: int64(1234567890),
})
if err != nil {
    // handle error
}
// result is *tg.Updates

Possible Errors

Code Type Description
400 INPUT_STARS_AMOUNT_INVALID
400 INPUT_STARS_NANOS_INVALID
400 INVOICE_INVALID The specified invoice is invalid.
400 PEER_ID_INVALID The provided peer id is invalid.
400 RESELL_STARS_TOO_FEW
400 RESELL_STARS_TOO_MUCH
400 STARGIFT_OFFER_INVALID
400 STARGIFT_OFFER_NOT_ALLOWED
400 STARGIFT_SLUG_INVALID The specified gift slug is invalid.