Layer 220
PaymentsGetStarsStatus
Get the current Telegram Stars balance of the current account (with peer= input Peer Self ), or the stars balance of the bot specified in peer.
method
Users
Business
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| Ton | flags.0?true | If set, returns the channel/ad revenue balance in nanotons. |
| Peer | InputPeer | Peer of which to get the balance. |
Returns
payments.StarsStatusPossible Errors
| Code | Type | Description |
|---|---|---|
| 403 | BOT_ACCESS_FORBIDDEN | The specified method can be used over a business connection for some operations, but the specified query attempted an operation that is not allowed over a business connection. |
| 400 | BUSINESS_CONNECTION_INVALID | The connection_id passed to the wrapping invoke With Business Connection call is invalid. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
Gogram Example
// PaymentsGetStarsStatus - using Params struct result, err := client.PaymentsGetStarsStatus(&tg.PaymentsGetStarsStatusParams{ Peer: &tg.InputPeerUser{UserID: int64(123456789)}, // Optional fields: // Ton: true, }) if err != nil { // handle error } // result is *tg.PaymentsStarsStatus