Use this method to add a new sticker to a set created by the bot
Use this method to add a new sticker to a set created by the bot. You must use exactly one of the fields png_sticker or tgs_sticker. Animated stickers can be added to animated sticker sets and only to them. Animated sticker sets can have up to 50 stickers. Static sticker sets can have up to 120 stickers. Returns True on success.
Body
Required
-
User identifier of sticker set owner
-
Sticker set name
png_sticker
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.
PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. 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 »
-
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.
-
One or more emoji corresponding to the sticker
-
This object describes the position on faces where a mask should be placed by default.
curl \
-X POST https://api.telegram.org/bot123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11/addStickerToSet \
-H "Content-Type: multipart/form-data" \
-F "user_id=42" \
-F "name=string" \
-F "emojis=string" \
-F 'mask_position={"point":"forehead","x_shift":42.0,"y_shift":42.0,"scale":42.0}'
{
"user_id": 42,
"name": "string",
"emojis": "string",
"mask_position": {
"point": "forehead",
"x_shift": 42.0,
"y_shift": 42.0,
"scale": 42.0
}
}
{
"user_id": 42,
"name": "string",
"emojis": "string",
"mask_position": {
"point": "forehead",
"x_shift": 42.0,
"y_shift": 42.0,
"scale": 42.0
}
}
{
"ok": false,
"error_code": 42,
"description": "string",
"parameters": {
"migrate_to_chat_id": 42,
"retry_after": 42
}
}
{
"ok": false,
"error_code": 42,
"description": "string",
"parameters": {
"migrate_to_chat_id": 42,
"retry_after": 42
}
}
{
"ok": true,
"result": true
}
{
"ok": true,
"result": true
}