Skip to main content

Channel / User Info

Get public information about a Telegram channel or user by username.

Endpoint

GET /api/telegram/{username}

Path Parameters

username
string
required
The Telegram username to look up (e.g. durov, telegram).

Example Request

cURL
curl -X GET "https://rocks.rive.wtf/api/telegram/durov" \
  -H "Authorization: Bearer YOUR_API_KEY"
JavaScript
const response = await fetch('https://rocks.rive.wtf/api/telegram/durov', {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});
const data = await response.json();
console.log(data);
Python
import requests

headers = {'Authorization': 'Bearer YOUR_API_KEY'}
response = requests.get(
    'https://rocks.rive.wtf/api/telegram/durov',
    headers=headers
)
print(response.json())

Response Example

{
  "id": 1006503122,
  "title": "Pavel Durov",
  "username": "durov",
  "type": "channel",
  "description": "Founder of Telegram.",
  "members": 10445535,
  "photo": "<base64-encoded profile photo>"
}

Response Fields

FieldTypeDescription
idintegerUnique Telegram ID of the channel or user
titlestringDisplay name of the channel or user
usernamestringTelegram username (without the @)
typestringAccount type — channel, user, group, etc.
descriptionstringBio or channel description
membersintegerNumber of members or subscribers
photostringBase64-encoded JPEG profile photo
The photo field returns a base64-encoded JPEG string. To display it in a browser, prefix it with data:image/jpeg;base64,.
Only public Telegram channels and users can be looked up. Private accounts or groups will return an error.