You can use Telethon . The Telegram API is quite complex and with telethon you can start using the telegram API in a very short time without any prior knowledge of the API.
pip install telethon
Then register your application (taken from the telethon): 
link: https://my.telegram.org/
Then to get the group message history (assuming you have a group ID):
chat_id = YOUR_CHAT_ID api_id=YOUR_API_ID api_hash = 'YOUR_API_HASH' from telethon import TelegramClient from telethon.tl.types.input_peer_chat import InputPeerChat client = TelegramClient('session_id', api_id=api_id, api_hash=api_hash) client.connect() chat = InputPeerChat(chat_id) total_count, messages, senders = client.get_message_history( chat, limit=10) for msg in reversed(messages): # Format the message content if getattr(msg, 'media', None): content = '<{}> {}'.format( # The media may or may not have a caption msg.media.__class__.__name__, getattr(msg.media, 'caption', '')) elif hasattr(msg, 'message'): content = msg.message elif hasattr(msg, 'action'): content = str(msg.action) else: # Unknown message, simply print its class name content = msg.__class__.__name__ text = '[{}:{}] (ID={}) {}: {} type: {}'.format( msg.date.hour, msg.date.minute, msg.id, "no name", content) print (text)
The example is taken and simplified from the telethon example .
source share