CRMchat APIBeta
Telegram APIPayments

payments.getSavedStarGifts

POST
/workspaces/{workspaceId}/telegram-accounts/{accountId}/call/payments.getSavedStarGifts

Fetch the full list of gifts » owned, received or hosted » by a peer. Note that unlike what the name suggests, the method can be used to fetch both "saved" and "unsaved" gifts (aka gifts both pinned and not pinned) to the profile, depending on the passed flags.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

workspaceId*string

Workspace ID

accountId*string

Telegram account ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

params*

Fetch the full list of gifts » owned, received or hosted » by a peer. Note that unlike what the name suggests, the method can be used to fetch both "saved" and "unsaved" gifts (aka gifts both pinned and not pinned) to the profile, depending on the passed flags.

Response Body

application/json

application/json

curl -X POST "https://example.com/workspaces/string/telegram-accounts/string/call/payments.getSavedStarGifts" \  -H "Content-Type: application/json" \  -d '{    "params": {      "peer": {        "_": "inputPeerEmpty"      },      "offset": "string",      "limit": 0    }  }'
{  "result": {    "_": "payments.savedStarGifts",    "count": 0,    "chatNotificationsEnabled": true,    "gifts": [      {        "_": "savedStarGift",        "nameHidden": true,        "unsaved": true,        "refunded": true,        "canUpgrade": true,        "pinnedToTop": true,        "upgradeSeparate": true,        "fromId": {          "_": "peerUser",          "userId": 0        },        "date": 0,        "gift": {          "_": "starGift",          "limited": true,          "soldOut": true,          "birthday": true,          "requirePremium": true,          "limitedPerUser": true,          "peerColorAvailable": true,          "auction": true,          "id": "string",          "sticker": {            "_": "documentEmpty",            "id": "string"          },          "stars": "string",          "availabilityRemains": 0,          "availabilityTotal": 0,          "availabilityResale": "string",          "convertStars": "string",          "firstSaleDate": 0,          "lastSaleDate": 0,          "upgradeStars": "string",          "resellMinStars": "string",          "title": "string",          "releasedBy": {            "_": "peerUser",            "userId": 0          },          "perUserTotal": 0,          "perUserRemains": 0,          "lockedUntilDate": 0,          "auctionSlug": "string",          "giftsPerRound": 0,          "auctionStartDate": 0,          "upgradeVariants": 0,          "background": {            "_": "starGiftBackground",            "centerColor": 0,            "edgeColor": 0,            "textColor": 0          }        },        "message": {          "_": "textWithEntities",          "text": "string",          "entities": [            {              "_": "messageEntityUnknown",              "offset": 0,              "length": 0            }          ]        },        "msgId": 0,        "savedId": "string",        "convertStars": "string",        "upgradeStars": "string",        "canExportAt": 0,        "transferStars": "string",        "canTransferAt": 0,        "canResellAt": 0,        "collectionId": [          0        ],        "prepaidUpgradeHash": "string",        "dropOriginalDetailsStars": "string",        "giftNum": 0,        "canCraftAt": 0      }    ],    "nextOffset": "string",    "chats": [      {        "_": "chatEmpty",        "id": 0      }    ],    "users": [      {        "_": "userEmpty",        "id": 0      }    ]  }}