payments.getStarsRevenueWithdrawalUrl
Withdraw funds from a channel or bot's star balance ».
Withdraw funds from a channel or bot's [star balance »](https://core.telegram.org/api/stars.md#withdrawing-revenue).
| Name | Type | Required | Description |
|---|---|---|---|
ton | true | No | If set, withdraws channel/ad revenue in TON. |
peer | InputPeer | Yes | Channel or bot from which to withdraw funds. |
amount | long | No | The amount of stars or nanograms to withdraw. |
password | InputCheckPasswordSRP | Yes | 2FA password, see [here »](https://core.telegram.org/api/srp.md#using-the-2fa-password) for more info. |
Replies
payments.StarsRevenueWithdrawalUrl
MTProto RPC
- 400 · PASSWORD_HASH_INVALID — The provided password hash is invalid.
- 400 · PASSWORD_MISSING — You must [enable 2FA](https://core.telegram.org/api/srp.md) before executing this operation.
- 400 · PASSWORD_TOO_FRESH_%d — The password was modified less than 24 hours ago, try again in %d seconds.
- 400 · SESSION_TOO_FRESH_%d — This session was created less than 24 hours ago, try again in %d seconds.