API
Telegram API
电报每月拥有超过10亿活跃用户,分享消息、频道、群组、语音笔记、机器人和媒体,成为直接分发、社区管理和快速新闻受众的重要平台。
API 参考 版本: 1.0.0 7 终端 身份验证
基本网址
https://api.pressmonitor.com 身份验证
所有请求使用 Bearer 令牌身份验证。每个调用都添加授权头。
Authorization: Bearer YOUR_API_KEY
x-subscription-id: YOUR_SUB_ID GET
/bot-info 机器人信息
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| username | string | query | 是 | 用户名 |
代码示例
curl -X GET "https://api.pressmonitor.com/bot-info?username=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/channel-info 频道信息
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| username | string | query | 是 | 用户名 |
代码示例
curl -X GET "https://api.pressmonitor.com/channel-info?username=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/get-messages 获取消息
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| username | string | query | 是 | 用户名 |
| offset | string | query | 不 | 偏移量 |
代码示例
curl -X GET "https://api.pressmonitor.com/get-messages?username=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/group-info 群组信息
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| username | string | query | 是 | 用户名 |
代码示例
curl -X GET "https://api.pressmonitor.com/group-info?username=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/search 搜索
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| keyword | string | query | 是 | 关键词 |
代码示例
curl -X GET "https://api.pressmonitor.com/search?keyword=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/search-hashtag 搜索话题标签
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| hashtag | string | query | 是 | 话题标签 |
| offset | string | query | 不 | 偏移量 |
代码示例
curl -X GET "https://api.pressmonitor.com/search-hashtag?hashtag=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功
GET
/user-info 用户信息
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| username | string | query | 是 | 用户名 |
代码示例
curl -X GET "https://api.pressmonitor.com/user-info?username=VALUE" -H "Authorization: Bearer YOUR_API_KEY" -H "x-subscription-id: YOUR_SUB_ID" 响应
200 成功