Skip to main content

payments.getStarsRevenueWithdrawalUrl

Withdraw funds from a channel or bot's star balance ».

func (c *Client) PaymentsGetStarsRevenueWithdrawalURL(ctx context.Context, request *PaymentsGetStarsRevenueWithdrawalURLRequest) (*PaymentsStarsRevenueWithdrawalURL, error)

Calling this method

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

res, err := api.PaymentsGetStarsRevenueWithdrawalURL(ctx, &tg.PaymentsGetStarsRevenueWithdrawalURLRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *PaymentsStarsRevenueWithdrawalURL
return nil
})

Parameters

NameTypeRequiredDescription
TonboolIf set, withdraws channel/ad revenue in TON.
PeerInputPeerClassyesChannel or bot from which to withdraw funds.
Amountint64The amount of stars or nanotons to withdraw.
PasswordInputCheckPasswordSRPClassyes2FA password, see here » for more info.

Returns

*PaymentsStarsRevenueWithdrawalURL

Possible errors

CodeTypeDescription
400PASSWORD_HASH_INVALIDThe provided password hash is invalid.
400PASSWORD_MISSINGYou must enable 2FA before executing this operation.

References