0
votes

I am trying to get these below information of a group from telegram API

  • Group Title
  • Group Description
  • Group Profile Photo
  • Group Category
  • Group Location
  • Group Language
  • Group Created Date

Here is my try:(Not: please put a correct bot token. I have changed mine)

request = requests.get("https://api.telegram.org/bot5403727744:AAHUVlLAf7FWWsITl1dekHkI0UfWdj0/getChat?chat_id=@germandx5") 

with this request object I got these response below:

All Data:  {'ok': True, 'result': {'id': -1001476807610, 'title': '????????Deutsche Instagram L+C Gruppe  ????????', 'username': 'germandx5', 'type': 'supergroup', 'description': '????????Deutsche Gruppe für Likes und Kommentare auf Instagram.\nREGELN: https://t.me/germandx  5/7441\n????Verwaltung: @instamagician\nInstagram: https://instagram.com/petronius777', 'permissions': {'can_send_messages': True, 'can_send_media_messages': False, 'can_send_polls': False, 'can_send_other_messages': False, 'can_add_web_page_previews': False, 'can_change_info': False, 'can_invite_users': True, 'can_pin_messages': False}, 'join_to_send_messages': True, 'slow_mode_delay': 60, 'photo': {'small_file_id': 'AQADAgADsasxG5VrYEoACAIAA0akVNMW____tnnT8MZhRB8pBA', 'small_file_unique_id': 'AQADsasxG5VrYEoAAQ', 'big_file_id': 'AQADAgADsasxG5VrYEoACAMAA0akVNMW____tnnT8MZhRB8pBA', 'big_file_unique_id': 'AQADsasxG5VrYEoB'}}}

As you can see I am able to reach the group title and description. But I am not able to reach the other information which has been listed above. I have lookup the telegram API for available types and methods. But did not find any solution because I do not know how to use available types.
I just find one useful method which is getChat Could you please help me? Any solution or snippets would be perfect.

Thanks guys from now :)