플랫폼 인텔리전스 API
텔레그램 API
텔레그램은 10억 명 이상의 월간 활성 사용자가 메시지, 채널, 그룹, 음성 메시지, 봇 및 미디어를 공유하여 직접 배포, 커뮤니티 관리 및 빠르게 변화하는 뉴스 청중에게 중요한 플랫폼입니다.
API 참조 버전: 1.0.0 7 엔드포인트 인증
기본 URL
https://api.pressmonitor.com/telegram/v1 인증
모든 요청은 Bearer 토큰 인증을 사용합니다. 각 호출에 Authorization 헤더를 추가하세요.
Authorization: Bearer YOUR_TOKEN GET
/bot-info 봇 정보
Bot Info
매개변수
| 이름 | 유형 | 위치 | 필수 | 설명 |
|---|---|---|---|---|
| username | string | query | 예 | 사용자 이름 |
코드 예제
curl --request GET \ --url 'https://api.pressmonitor.com/telegram/v1/bot-info?username=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/telegram/v1/bot-info?username=SOME_STRING_VALUE", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/telegram/v1/bot-info" querystring = {"username":"SOME_STRING_VALUE"} response = requests.request("GET", url, params=querystring) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/telegram/v1/bot-info?username=SOME_STRING_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/telegram/v1/bot-info?username=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); 응답
200 성공
GET
/channel-info 채널 정보
Channel Info
매개변수
| 이름 | 유형 | 위치 | 필수 | 설명 |
|---|---|---|---|---|
| username | string | query | 예 | 사용자 이름 |
코드 예제
curl --request GET \ --url 'https://api.pressmonitor.com/telegram/v1/channel-info?username=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/telegram/v1/channel-info?username=SOME_STRING_VALUE", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/telegram/v1/channel-info" querystring = {"username":"SOME_STRING_VALUE"} response = requests.request("GET", url, params=querystring) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/telegram/v1/channel-info?username=SOME_STRING_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/telegram/v1/channel-info?username=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); 응답
200 성공
GET
/get-messages 메시지 가져오기
Get Messages
매개변수
| 이름 | 유형 | 위치 | 필수 | 설명 |
|---|---|---|---|---|
| username | string | query | 예 | 사용자 이름 |
| offset | string | query | 아니요 | 오프셋 |
코드 예제
curl --request GET \ --url 'https://api.pressmonitor.com/telegram/v1/get-messages?username=SOME_STRING_VALUE&offset=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/telegram/v1/get-messages?username=SOME_STRING_VALUE&offset=SOME_STRING_VALUE", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/telegram/v1/get-messages" querystring = {"username":"SOME_STRING_VALUE","offset":"SOME_STRING_VALUE"} response = requests.request("GET", url, params=querystring) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/telegram/v1/get-messages?username=SOME_STRING_VALUE&offset=SOME_STRING_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/telegram/v1/get-messages?username=SOME_STRING_VALUE&offset=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); 응답
200 성공
GET
/group-info 그룹 정보
Group Info
매개변수
| 이름 | 유형 | 위치 | 필수 | 설명 |
|---|---|---|---|---|
| username | string | query | 예 | 사용자 이름 |
코드 예제
curl --request GET \ --url 'https://api.pressmonitor.com/telegram/v1/group-info?username=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/telegram/v1/group-info?username=SOME_STRING_VALUE", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/telegram/v1/group-info" querystring = {"username":"SOME_STRING_VALUE"} response = requests.request("GET", url, params=querystring) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/telegram/v1/group-info?username=SOME_STRING_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/telegram/v1/group-info?username=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); 응답
200 성공
GET
/search 검색
Search
매개변수
| 이름 | 유형 | 위치 | 필수 | 설명 |
|---|---|---|---|---|
| keyword | string | query | 예 | 키워드 |
코드 예제
curl --request GET \ --url 'https://api.pressmonitor.com/telegram/v1/search?keyword=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/telegram/v1/search?keyword=SOME_STRING_VALUE", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/telegram/v1/search" querystring = {"keyword":"SOME_STRING_VALUE"} response = requests.request("GET", url, params=querystring) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/telegram/v1/search?keyword=SOME_STRING_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/telegram/v1/search?keyword=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); 응답
200 성공
GET
/search-hashtag 해시태그 검색
Search Hashtag
매개변수
| 이름 | 유형 | 위치 | 필수 | 설명 |
|---|---|---|---|---|
| hashtag | string | query | 예 | 해시태그 |
| offset | string | query | 아니요 | 오프셋 |
코드 예제
curl --request GET \ --url 'https://api.pressmonitor.com/telegram/v1/search-hashtag?hashtag=SOME_STRING_VALUE&offset=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/telegram/v1/search-hashtag?hashtag=SOME_STRING_VALUE&offset=SOME_STRING_VALUE", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/telegram/v1/search-hashtag" querystring = {"hashtag":"SOME_STRING_VALUE","offset":"SOME_STRING_VALUE"} response = requests.request("GET", url, params=querystring) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/telegram/v1/search-hashtag?hashtag=SOME_STRING_VALUE&offset=SOME_STRING_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/telegram/v1/search-hashtag?hashtag=SOME_STRING_VALUE&offset=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); 응답
200 성공
GET
/user-info 사용자 정보
User Info
매개변수
| 이름 | 유형 | 위치 | 필수 | 설명 |
|---|---|---|---|---|
| username | string | query | 예 | 사용자 이름 |
코드 예제
curl --request GET \ --url 'https://api.pressmonitor.com/telegram/v1/user-info?username=SOME_STRING_VALUE' const http = require("https"); const options = { "method": "GET", "hostname": "api.pressmonitor.com", "port": null, "path": "/telegram/v1/user-info?username=SOME_STRING_VALUE", "headers": {} }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); import requests url = "https://api.pressmonitor.com/telegram/v1/user-info" querystring = {"username":"SOME_STRING_VALUE"} response = requests.request("GET", url, params=querystring) print(response.text) <?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.pressmonitor.com/telegram/v1/user-info?username=SOME_STRING_VALUE", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://api.pressmonitor.com/telegram/v1/user-info?username=SOME_STRING_VALUE") .get() .build(); Response response = client.newCall(request).execute(); 응답
200 성공