From d5f30487cb5e59efd974915d99810f06fe4a8694 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 28 Feb 2026 01:39:32 +0000 Subject: [PATCH] Add instructions for obtaining a Matrix bot access token Walk through creating a bot account, logging in via the client API to retrieve the access token, and inviting the bot to the room. https://claude.ai/code/session_01LPpSZFfyh6vdV5HGFWjoQX --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 58fc7f5..3b9fa0b 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,28 @@ pip install -r requirements.txt python -m gaming_deals_bot ``` +## Obtaining a Matrix Bot Access Token + +1. **Create a bot account** on your homeserver (e.g. via Element: register a new account like `@dealsbot:example.com`). + +2. **Log in and get the access token** using `curl`: + + ```bash + curl -XPOST "https://matrix.example.com/_matrix/client/v3/login" \ + -H "Content-Type: application/json" \ + -d '{ + "type": "m.login.password", + "identifier": { "type": "m.id.user", "user": "dealsbot" }, + "password": "YOUR_PASSWORD" + }' + ``` + + The response will contain an `access_token` field — copy that value into your `.env` as `MATRIX_BOT_ACCESS_TOKEN`. + +3. **Invite the bot** to your deals room, then have the bot **accept the invite** (the bot does this automatically on startup). + +> **Tip:** After extracting the token you can change the bot account's password without invalidating the token. Store the token securely — anyone with it can act as the bot. + ## Configuration All configuration is via environment variables (see `.env.example`):