How do I get the user profile picture of someone using the Telegram bot chat API?

wrephebiajou picture wrephebiajou · Dec 15, 2017 · Viewed 8.2k times · Source

I'm making a basic Control Panel for managing my Bot with PHP.

Basically I want to display the Profile picture / avatar of the user who is sending message to the bot.

However the user object has no photo_id, so is there way to get the user's avatar?

Answer

Sean picture Sean · Dec 15, 2017

You need to use getUserProfilePhotos method, and then getFile.

For example: Awesome Telegram Bot