How to retrieve photo of a telegram contact?
<p>In an app, we need to import contacts of a user. We found <a href="https://github.com/enricostara/telegram.link/" rel="nofollow noreferrer">Telegram.Link</a> which implements Telegram API. It has a method that retrieves contacts. A single contact is showed below:</p>

<pre><code>{
T: api.type.UserContact,
id: 148049613,
first_name: "M.",
last_name: "Barezban",
username: "Barezban",
access_hash: "0x47ad17f617b9e945",
phone: "989363356056",
photo: {
  T: api.type.UserProfilePhoto,
  photo_id: "0x08d30ecd1b31a7bc",
  photo_small: {
    T: api.type.FileLocation,
    dc_id: 4,
    volume_id: "0x00000000192931a8",
    local_id: 75848,
    secret: "0xac6db13d308318b3"
  },
  photo_big: {
    T: api.type.FileLocation,
    dc_id: 4,
    volume_id: "0x00000000192931a8",
    local_id: 75850,
    secret: "0x4f302deb78247cce"
  }
},
status: {
  T: api.type.UserStatusOffline,
  was_online: 1463043346
}}
</code></pre>

<p>I found no way to download the profile photo. which method should I use?</p>

<p>I tried <a href="https://github.com/python-telegram-bot/python-telegram-bot" rel="nofollow noreferrer">python-telegram-bot</a> which implements Telegram Bot API and has two method that could help me: <code>getUserProfilePhotos</code> and <code>getFile</code>.</p>

<p>I tried <code>bot.getUserProfilePhotos(148049613)</code> and got <code>telegram.error.NetworkError: Bad Request: user not found (400)</code>.</p>

<p>I also tried <code>bot.getFile('0x08d30ecd1b31a7bc')</code> and got <code>telegram.error.NetworkError: Bad Request: invalid file id (400)</code></p>

<p>There is also a method named <a href="https://core.telegram.org/method/upload.getFile" rel="nofollow noreferrer">upload.getFile</a> that uses volume_id, local_id and secret but I don't know how to use and call this method.</p>

<p>So how can I download this photo?</p>