Skip to main content
The Users and Settings pages give you full visibility into who is using SAFIA and complete control over who is allowed to. You can browse every registered account, restrict access to a curated list of Telegram user IDs, and update configuration values — all without restarting the bot or editing files directly.

Viewing the user list

Navigate to Users (/users) to see every Telegram account that has interacted with your bot. The table shows the following columns for each account:
ColumnDescription
UserDisplay name and avatar initial
HandleTelegram username (e.g. @alice), if set
Statusactive (used the bot recently) or idle
RecordsTotal number of financial records the user has created
JoinedDate the account was first registered
Telegram IDThe numeric Telegram user ID
You can use this list to identify user IDs before adding them to the allowlist (see below).

Access control modes

SAFIA supports two access modes, configurable from the Settings page (/settings):

All Users

Any Telegram user who messages your bot can interact with it. This is the default mode — suitable for personal use or small, trusted groups.

Allowlist Only

Only Telegram user IDs explicitly added to the allowlist can use the bot. All other users receive a rejection message that includes their numeric Telegram ID.
If you are deploying SAFIA for a specific household, team, or closed group, switch to Allowlist only mode. It prevents unintended usage and keeps your LLM token costs predictable.

Switching access modes

1

Open Settings

In the dashboard sidebar, click Settings to navigate to /settings.
2

Select a mode

Under the Access Control card, click either All users or Allowlist only. The change is saved immediately — no restart required.

Managing the allowlist

Adding a user

1

Find the Telegram ID

Ask the person to open Telegram and send /start to @userinfobot. The bot replies instantly with their numeric Telegram ID (for example, 123456789). Alternatively, if they already tried to message your SAFIA bot while it is in allowlist mode, the rejection message includes their ID.
2

Open Settings

Navigate to Settings (/settings) in the admin dashboard.
3

Enter the ID

In the Allowed Telegram IDs section, type the numeric ID into the input field and click Add. The ID appears in the list immediately.

Removing a user

On the Settings page, find the ID in the Allowed Telegram IDs list and click Remove next to it. The user loses access immediately — no restart required.
The allowlist only takes effect when the access mode is set to Allowlist only. If you are in All users mode, the allowlist is stored but not enforced.

Editing configuration values

The Settings page also contains a full .env editor, organized into collapsible sections:
SectionExample variables
BotTELEGRAM_BOT_TOKEN
AI & VoiceLLM_PROVIDER, LLM_API_KEY, LLM_MODEL, GROQ_API_KEY
Search & DataFIRECRAWL_API_KEY, COINGECKO_API_KEY
StorageDATABASE_URL, REDIS_URL
Vector & EmbeddingsQDRANT_PATH, EMBEDDING_LOCAL, EMBEDDING_LOCAL_MODEL
Knowledge BaseKB_CHUNK_WORDS, KB_MAX_UPLOAD_MB
RemindersREMINDER_ENABLED, REMINDER_MAX_PER_USER
AdminADMIN_USERNAME, ADMIN_PASSWORD, FLASK_SECRET_KEY
To edit a value:
1

Expand a section

Click the section header (e.g. AI & Voice) to expand it and reveal its variables.
2

Click Edit

Click the Edit button next to the variable you want to change. An input field appears inline.
3

Enter the new value

Type the new value and click Save. The .env file is updated on disk immediately, preserving all comments and other entries.
4

Restart the bot

Most configuration changes require a restart to take effect. Run safia restart from your terminal after saving.
Sensitive values — any variable whose name ends in _KEY, _TOKEN, _PASSWORD, or _SECRET — are masked in the UI (shown as abc12345...). To update a sensitive value, click Edit and type the full new value. If you leave the field as the masked placeholder without changing it, SAFIA skips the update and keeps the existing value.