# Where can i access metadata from Tracker?

**URL:** https://forum.rasa.com/t/where-can-i-access-metadata-from-tracker/46297
**Category:** Rasa Open Source
**Created:** [July 29, 2021, 4:18pm UTC](https://forum.rasa.com/t/where-can-i-access-metadata-from-tracker/46297 "2021-07-29T16:18:13Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![dedanirungu](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/dedanirungu/32/13448_2.png) [@dedanirungu](https://forum.rasa.com/u/dedanirungu)
#### Post date: [February 2, 2024, 9:19am UTC](https://forum.rasa.com/t/where-can-i-access-metadata-from-tracker/46297/9 "2024-02-02T09:19:44Z")

</div>

Working solution [Telegram integration with rasa - #2 by fabiolamfleury](https://forum.rasa.com/t/telegram-integration-with-rasa/41940/2)

Going to post the solution i found:

Implemented a custom input channel in a file called `custom_telegram.py` the same folder that the `credentials.yml` is, with the content:

```auto
from rasa.core.channels import TelegramInput
from typing import Text

class TelegramInputChannel(TelegramInput):
    def get_metadata(self, request):
        metadata=request.json
        return metadata

```

Then, edited my `credentials.yml` using:

```auto
custom_telegram.TelegramInputChannel:
  access_token: "token provided by father bot"
  verify: "bot_username"
  webhook_url: "https://address/webhooks/telegram/webhook"

```

After that, it was possible to access in actions file:

```auto
    telegram_username = tracker.latest_message["metadata"]["from"]["username"] #user that sent the message
    telegram_chat_type = tracker.latest_message["metadata"]["chat"]["type"]
    if telegram_chat_type == 'group':
        is_group = True
    return [
                SlotSet("is_in_telegram_group", is_group),
            ]

```

---

_[View the full topic](https://forum.rasa.com/t/where-can-i-access-metadata-from-tracker/46297)._
