恒美微站 Logo 恒美微站
  • 首页
  • 关于我们
  • 建站服务
  • 主题模板
  • 案例展示
  • 资讯中心
  • 联系我们

telegram - api-reference

  • 首页
  • 资讯中心
  • /
  • telegram - api-reference

相关资讯

telegram - advanced-features 2026/10/3 2:26:31
RS-232与DB-9串口通信完全指南:引脚定义、接线与万用表实测技巧 2026/10/3 2:26:31
LKDS3.Linux内核的双向链表代码解析(3) 进程树遍历(上) 前置知识: children、sibling、real_parent、parent以及ptrace()调试进程 2026/10/3 2:26:31

最新资讯

PyCINRAD实战:从CINRAD雷达基数据到PPI图的完整流程与避坑指南
Elasticsearch性能调优实战:从写入链路到查询优化的全流程复盘
基于SpringBoot的智能药箱系统:药品分类与用药咨询实战
CSS响应式布局实战:视口、流式布局与媒体查询全攻略
《三国演义》人物词频分析:从分词归一到 publication 级词云图
AIGC检测时代:论文查重与降AIGC双达标实战指南

今日推荐

SAP生产预留实战指南:MB21/MB23/MB25协同与MRP集成
编译原理实验:递归下降分析器消除左递归与避坑指南
Python协议级爬取Shopee商品数据实战

本周热门

从像素到笔画:srt-whiteboard-animation骨架笔迹追踪实现(Zhang-Suen细化+8邻接追踪)
网站建设的英语怎么说?别只背单词,看完这套安全完整流程才敢上线
新手入门看这篇:建设网站加盟避坑指南与SEO实操

本月精选

我发现了一个新思路:用 Remotion + Claude Code 像写代码一样自动化生成短视频
Windows下 Codex 中 Chrome 和 Computer Use 插件不可用问题排查及解决参考方式:TaoToken 统一 Key 配置与验证
2026 大模型集体涨价:用 Python 做企业 Token 成本测算与选型避坑(附配置)

telegram - api-reference

发布时间:2026/10/3 2:26:31
telegram - api-reference Telegram Bot API - 完整参考目录认证发送方法编辑方法聊天方法成员方法更新与 Webhook机器人配置主要类型解析模式错误代码认证基础 URLhttps://api.telegram.org/botTOKEN/METHOD文件 URLhttps://api.telegram.org/file/botTOKEN/file_path方法GET 和 POST发送参数的方式查询字符串?chat_id123texthelloJSON bodyContent-Type: application/json表单数据Content-Type: application/x-www-form-urlencoded多部分Content-Type: multipart/form-data文件上传必须使用发送方法方法描述必填参数sendMessage文本chat_id、textsendPhoto照片chat_id、photosendVideo视频chat_id、videosendAnimationGIFchat_id、animationsendAudio音频/音乐chat_id、audiosendDocument文档chat_id、documentsendVoice语音消息chat_id、voicesendVideoNote圆形视频chat_id、video_notesendSticker贴纸chat_id、stickersendLocation位置chat_id、latitude、longitudesendVenue地点chat_id、latitude、longitude、title、addresssendContact联系人chat_id、phone_number、first_namesendPoll投票chat_id、question、optionssendDice动画骰子chat_idsendMediaGroup媒体组chat_id、mediasendChatAction打字动作chat_id、actionsendInvoice账单/支付chat_id、title、description、payload、currency、prices所有发送方法共用的参数参数类型描述chat_idInteger/String聊天 ID 或 usernamemessage_thread_idInteger主题 ID论坛中parse_modeStringHTML、MarkdownV2、Markdownreply_parametersObject用于回复某条消息reply_markupObjectInlineKeyboard 或 ReplyKeyboarddisable_notificationBoolean静默发送不通知protect_contentBoolean禁止转发effect_idString消息上的视觉特效sendChatAction - 可用动作typing、upload_photo、record_video、upload_video、record_voice、upload_voice、upload_document、find_location、record_video_note、upload_video_note、choose_sticker编辑方法方法描述editMessageText编辑文本editMessageCaption编辑说明文字editMessageMedia编辑媒体editMessageReplyMarkup编辑按钮deleteMessage删除消息deleteMessages删除多条forwardMessage转发forwardMessages转发多条copyMessage复制无转发自copyMessages复制多条聊天方法方法描述getChat聊天的完整信息getChatMemberCount成员数量getChatAdministrators管理员列表setChatTitle修改标题setChatDescription修改描述setChatPhoto修改照片deleteChatPhoto移除照片setChatPermissions默认权限setChatStickerSet贴纸集pinChatMessage置顶消息unpinChatMessage取消置顶消息unpinAllChatMessages取消置顶全部leaveChat退出聊天exportChatInviteLink生成链接createChatInviteLink创建自定义链接editChatInviteLink编辑链接revokeChatInviteLink撤销链接成员方法方法描述getChatMember成员信息banChatMember封禁unbanChatMember解除封禁restrictChatMember限制promoteChatMember提升为管理员setChatAdministratorCustomTitle自定义头衔approveChatJoinRequest批准入群declineChatJoinRequest拒绝入群更新与 Webhook方法描述getUpdates长轮询setWebhook注册 webhookdeleteWebhook移除 webhookgetWebhookInfowebhook 状态更新类型message、edited_message、channel_post、edited_channel_post、inline_query、chosen_inline_result、callback_query、shipping_query、pre_checkout_query、poll、poll_answer、my_chat_member、chat_member、chat_join_request、message_reaction、message_reaction_count机器人配置方法描述getMe机器人信息setMyCommands定义命令getMyCommands列出命令deleteMyCommands移除命令setMyName修改名称setMyDescription修改描述setMyShortDescription简短描述setMyDefaultAdministratorRights默认管理员权限setChatMenuButton菜单按钮setMyProfilePhoto个人资料照片主要类型Update{update_id:123,message:{...},callback_query:{...},inline_query:{...}}Message{message_id:1,from:{id:123,first_name:User},chat:{id:123,type:private},date:1709000000,text:Hello,entities:[{type:bot_command,offset:0,length:6}]}CallbackQuery{id:query123,from:{id:123},message:{...},data:callback_data_string}InlineKeyboardMarkup{inline_keyboard:[[{text:Button,callback_data:data}],[{text:URL,url:https://example.com}]]}ReplyKeyboardMarkup{keyboard:[[{text:Option 1},{text:Option 2}],[{text:Send Location,request_location:true}]],resize_keyboard:true,one_time_keyboard:true}解析模式HTMLbbold/biitalic/iuunderline/usstrikethrough/stg-spoilerspoiler/tg-spoilercodeinline code/codeprepreformatted/preprecodeclasslanguage-pythonpython code/code/preahrefhttps://example.comlink/aahreftg://user?id123user mention/ablockquotequote/blockquoteMarkdownV2*bold* _italic_ __underline__ ~strikethrough~ ||spoiler|| inline code pre block python python codelinkuserblockquote**MarkdownV2 中需要转义的字符** _ * [ ] ( ) ~ # - | { } . ! --- ## 错误代码 | 代码 | 描述 | 应对 | |--------|-----------|------| | 400 | Bad Request - 参数无效 | 检查参数 | | 401 | Unauthorized - 令牌无效 | 检查令牌 | | 403 | Forbidden - 机器人被屏蔽 | 用户屏蔽了机器人 | | 404 | Not Found - 方法无效 | 检查方法名称 | | 409 | Conflict - webhook 和轮询冲突 | 只使用一种方法 | | 429 | Too Many Requests - 速率限制 | 等待 retry_after 秒 | ### 常见错误消息 - chat not found - 聊天 ID 无效或机器人未启动 - bot was blocked by the user - 用户屏蔽了机器人 - message to edit not found - 消息已被删除 - query is too old - 回调查询已过期需在 10 秒内响应 - message is not modified - 文本与之前相同 - BUTTON_DATA_INVALID - callback_data 64 字节 - have no rights to send a message - 机器人在群组中没有权限

关于恒美微站

恒美微站专注于为个体商户、工作室提供极简自助建站服务,让每个人都能轻松拥有专业网站。

快速链接

  • 关于我们
  • 建站服务
  • 主题模板
  • 案例展示
  • 资讯中心

服务项目

  • 可视化建站
  • 拖拽编辑
  • 主题定制
  • SEO 优化
  • 网站托管

联系方式

  • 📍 地址:北京市朝阳区建国路 88 号
  • 📞 电话:400-888-8888
  • ✉️ 邮箱:info@hmyw.cn
  • 🕐 时间:周一至周日 9:00-18:00

© 2024 恒美微站 hmyw.cn 版权所有 | 京 ICP 备 12345678 号