English
English
Appearance
English
English
Appearance
/public/addon/telegram/channelLists the Telegram channels and groups a connected Telegram account can post to. Pass the chosen item as additionalInfo.channel in Create Schedule to publish there instead of to the account's Story.
Authorization: Basic Base64(AccessKey:SecretKey))| Parameter | Type | Required | Description |
|---|---|---|---|
accountId | string | Yes | The unique ID of a connected Telegram account. |
curl -X GET "https://api.repliz.com/public/addon/telegram/channel?accountId=680affa5ce12f2f72916f67e" \
-H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)"import axios from 'axios';
const response = await axios.get('https://api.repliz.com/public/addon/telegram/channel', {
params: {
accountId: '680affa5ce12f2f72916f67e'
},
auth: {
username: 'YOUR_ACCESS_KEY',
password: 'YOUR_SECRET_KEY'
}
});
console.log(response.data);const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');
const response = await fetch('https://api.repliz.com/public/addon/telegram/channel?accountId=680affa5ce12f2f72916f67e', {
headers: {
'Authorization': `Basic ${credentials}`
}
});
const data = await response.json();
console.log(data);{
"docs": [
{
"id": "-1001234567890",
"name": "Repliz",
"picture": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...",
"type": "channel"
},
{
"id": "-1009876543210",
"name": "Repliz Community",
"picture": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...",
"type": "group"
}
]
}// Account Not Found
{
"code": 404,
"message": "account not found"
}
// Session Not Found
{
"code": 404,
"message": "session not found"
}{
"code": 401,
"message": "unauthorized"
}| Field | Description |
|---|---|
id | Telegram ID of the channel or group, for example -1001234567890. |
name | Display name of the channel or group. |
picture | Photo of the channel or group as a data: URI. Empty when it has no photo. |
type | channel or group. Channels and supergroups have IDs of the same shape, so type is what tells them apart. |
The list has the channels the account created or manages as an admin (channels it only follows are left out), followed by every group it is a member of. A group where the account isn't allowed to post is listed too, and a schedule to it fails when it's published. The account's own Story is not in the list: to post there, leave additionalInfo.channel out of the schedule.
A session not found error means the account is not a Telegram account, or its Telegram login has ended, for example because its session was ended under Settings → Devices in Telegram. Reconnect the account and try again.