> For the complete documentation index, see [llms.txt](https://thecontentforge.gitbook.io/thecontentforge-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://thecontentforge.gitbook.io/thecontentforge-docs/feature-guides/bot-history/security-log.md).

# Security Log

The Security Log records **Telegram bot access events** for your organisation - who tried to use the bot and whether your allowlist rules let them through. It does **not** store message content.

Open it from **Bot History > Security Log**.

### Who can use it

Editors and Admins.

### What gets logged

The log captures bot access and allowlist enforcement events:

| Event                | Meaning                                                                    |
| -------------------- | -------------------------------------------------------------------------- |
| **Blocked DM**       | Someone messaged the bot in a private chat (the bot never responds in DMs) |
| **Blocked chat**     | A message came from a group/chat that is not on your allowlist             |
| **Blocked user**     | A user who is not allowlisted tried to use the bot in an allowlisted chat  |
| **Command executed** | An allowlisted user successfully ran a bot command                         |
| **Error**            | The bot hit an error while handling a message                              |

Each row shows the event type, the Telegram **Chat ID** and **User ID** involved, the **command** (where relevant), and the **time**. Filter the table by any of the five event types.

### Workflow

* Check the log when you expect bot activity that isn't happening - a blocked chat or blocked user usually means the chat or user isn't allowlisted yet
* Confirm that a command actually ran by looking for its **Command executed** entry
* Review blocked attempts to see who is trying to reach the bot from outside your allowlist

To add a chat or user to the allowlist, use **Settings > General** (Telegram Bot Health + Allowlisted Chat/User IDs). See [Telegram Bot](/thecontentforge-docs/admin-guide/telegram-bot.md).

### Good to know

* Message content is **never** stored - only access events and metadata
* This is a bot-access log, not a general account audit trail. Sign-ins, role changes, and settings edits are **not** recorded here
* If you see genuinely suspicious activity, contact TheContentForge support


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://thecontentforge.gitbook.io/thecontentforge-docs/feature-guides/bot-history/security-log.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
