Layer 227
PaymentsGetStarsStatus
Get the current Telegram Stars balance of the current account (with peer= input Peer Self ), or the stars balance of the bot or channel specified in peer.
method
Users
Business
payments.getStarsStatus#4ea9b3bf flags:# ton:flags.0?true peer:InputPeer = payments.StarsStatus;
Parameters
| Name | Type | Description |
|---|---|---|
| Ton | flags .0? true | If set, returns the channel/ad revenue balance in nanograms. |
| Peer | InputPeer | Peer of which to get the balance. |
Returns
payments.StarsStatusGogram Example
// PaymentsGetStarsStatus - positional arguments result, err := client.PaymentsGetStarsStatus(nil, &tg.InputPeerUser{UserID: int64(777000)}) if err != nil { // handle error } // result is *tg.PaymentsStarsStatus
Possible 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. |