Skip to content

Get Telegram Channel ​

GET /public/addon/telegram/channel

Lists 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.

Endpoint Details ​

  • Authentication: Basic Auth (Authorization: Basic Base64(AccessKey:SecretKey))
  • Access Tier: Premium+

Parameters ​

ParameterTypeRequiredDescription
accountIdstringYesThe unique ID of a connected Telegram account.

Example Request ​

bash
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)"
javascript
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);
javascript
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);

Response ​

json
{
  "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"
    }
  ]
}
json
// Account Not Found
{
  "code": 404,
  "message": "account not found"
}

// Session Not Found
{
  "code": 404,
  "message": "session not found"
}
json
{
  "code": 401,
  "message": "unauthorized"
}
FieldDescription
idTelegram ID of the channel or group, for example -1001234567890.
nameDisplay name of the channel or group.
picturePhoto of the channel or group as a data: URI. Empty when it has no photo.
typechannel 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.