BlackBrain BlackBrain - 1 year ago 257
reST (reStructuredText) Question

Telegram Get Channel Profile Photo using Bot API

I need to get the profile picture of a channel in Telegram. According to this doc:

I first try to use getChat to get the basic information about a channel . Which I get successfully. It gives me a json like this:


After this I try to use 'getUserProfilePhotos' to get the profile photo. But I can't get it to work because it responds with error when I either pass the id I got from the last request or the channeld username (@channelName).

Do you know how can I accomplish this using Bot API for Telegram?

Answer Source

It's not available now in Bot API. getUserProfilePhotos method require user_id parameter, not chat_id as you tryed.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download