Use this method to set the thumbnail of a sticker set

POST /setStickerSetThumb

Use this method to set the thumbnail of a sticker set. Animated thumbnails can be set for animated sticker sets only. Returns True on success.

Body Required

  • name string Required

    Sticker set name

  • user_id integer Required

    User identifier of the sticker set owner

  • thumb string

    Any of:

    This object represents the contents of a file to be uploaded. Must be posted using multipart/form-data in the usual way that files are uploaded via the browser.

    A PNG image with the thumbnail, must be up to 128 kilobytes in size and have width and height exactly 100px, or a TGS animation with the thumbnail up to 32 kilobytes in size; see https://core.telegram.org/animated_stickers#technical-requirements for animated sticker technical requirements. Pass a file_id as a String to send a file that already exists on the Telegram servers, pass an HTTP URL as a String for Telegram to get a file from the Internet, or upload a new one using multipart/form-data. More info on Sending Files ». Animated sticker set thumbnail can't be uploaded via HTTP URL.

Responses

  • default
    Hide response attributes Show response attributes object
    • ok boolean Required

      Default value is false.

    • error_code integer Required
    • description string Required
    • parameters object

      Contains information about why a request was unsuccessful.

      Hide parameters attributes Show parameters attributes object
      • migrate_to_chat_id integer

        Optional. The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it is smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.

      • retry_after integer

        Optional. In case of exceeding flood control, the number of seconds left to wait before the request can be repeated

  • 200
    Hide response attributes Show response attributes object
    • ok boolean Required

      Default value is true.

    • result boolean Required

      Default value is true.

POST /setStickerSetThumb
curl \
 -X POST https://api.telegram.org/bot123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11/setStickerSetThumb \
 -H "Content-Type: multipart/form-data" \
 -F "name=string" \
 -F "user_id=42"
Request example
{
  "name": "string",
  "user_id": 42
}
Request examples
{
  "name": "string",
  "user_id": 42
}
Response examples (default)
{
  "ok": false,
  "error_code": 42,
  "description": "string",
  "parameters": {
    "migrate_to_chat_id": 42,
    "retry_after": 42
  }
}
Response examples (default)
{
  "ok": false,
  "error_code": 42,
  "description": "string",
  "parameters": {
    "migrate_to_chat_id": 42,
    "retry_after": 42
  }
}
Response examples (200)
{
  "ok": true,
  "result": true
}
Response examples (200)
{
  "ok": true,
  "result": true
}