Telegram Bot API
🌐 中文

removeBusinessAccountProfilePhoto

分类: 商业 · Bot API 10.3 · 官方文档

移除商业账户头像。

返回值: 调用成功时返回 True。

参数

参数类型必填说明
business_connection_idString是商业连接 ID
is_publicBoolean可选移除公开头像而非主头像

参数说明为简要概括,完整内容请参阅官方文档。

请求示例

curl

curl -s -X POST "https://api.telegram.org/bot$TOKEN/removeBusinessAccountProfilePhoto" \
  -H "Content-Type: application/json" \
  -d '{"business_connection_id":"BUSINESS_CONNECTION_ID"}'

Python

import requests

TOKEN = "123456789:AAEexampleTokenReplaceWithYours"
resp = requests.post(
    f"https://api.telegram.org/bot{TOKEN}/removeBusinessAccountProfilePhoto",
    json={
        "business_connection_id": "BUSINESS_CONNECTION_ID"
    },
    timeout=30,
)
print(resp.json())

JavaScript

const TOKEN = "123456789:AAEexampleTokenReplaceWithYours";
const res = await fetch(`https://api.telegram.org/bot${TOKEN}/removeBusinessAccountProfilePhoto`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "business_connection_id": "BUSINESS_CONNECTION_ID"
  }),
});
console.log(await res.json());

分步教程: Telegram 机器人教程:从零创建 Telegram 机器人并发送第一条消息