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
| Name | Type | Required | Description |
|---|---|---|---|
Ton | bool | — | If set, withdraws channel/ad revenue in TON. |
Peer | InputPeerClass | yes | Channel or bot from which to withdraw funds. |
Amount | int64 | — | The amount of stars or nanotons to withdraw. |
Password | InputCheckPasswordSRPClass | yes | 2FA password, see here » for more info. |
Returns
*PaymentsStarsRevenueWithdrawalURL
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | PASSWORD_HASH_INVALID | The provided password hash is invalid. |
| 400 | PASSWORD_MISSING | You must enable 2FA before executing this operation. |
References
- Official documentation
- Generated Go reference
- TL definition:
payments.getStarsRevenueWithdrawalUrl#2433dc92