def configure_telegram(main_folder):
    """ Configure Telegram """
    print(
        """Welcome to The Wizard!
The first thing you will need is an authorization token from the botfather.
If you don't know how to get one, read here: https://core.telegram.org/bots#6-botfather"""
        )
    token = input('Authorization token: ')
    print("Thanks, let's test this out. Say something to your bot")
    from pybliotecario.TelegramUtil import TelegramUtil
    teleAPI = TelegramUtil(token, timeout=20)
    while True:
        all_updates = teleAPI.get_updates(not_empty=True)
        from pybliotecario.Message import Message
        update = Message(all_updates[0])
        print('Message received: {0}'.format(update.text))
        yn = input('Was this your msg? [y/n] ')
        if yn.lower() in ('y', 's'):
            chat_id = update.chat_id
            print('Your chat id is: {0} and your username is: {1}'.format(
                chat_id, update.username))
            break
        else:
            print('Try again')
    config_dict = {'DEFAULT': {'TOKEN': token, 'chat_id': chat_id,
        'main_folder': main_folder}}
    return config_dict
