claude.ai won't let me login using email and password, so I have to use login code. I hate check email, so...
This program monitors an email inbox for messages from Anthropic and forwards the mail subject to telegram channel.
Create a config.toml
file with the following structure:
[email]
host = "imap.example.com"
user = "your_email@example.com"
password = "notsecure"
[telegram]
api_id = "123456"
api_hash = "xxyyaabb"
bot_token = "123456:xxxxxx"
channel_id = -123456789
Run the program using the following command:
python -m claude_login_code -c /path/to/config.toml
The program will continuously monitor your email inbox and forward Anthropic messages to the specified Telegram channel.
A Dockerfile
is included, in case you want to run it in container.
The config.toml
file contains the necessary configuration options:
-
[email]
section:host
: IMAP host address of your email provideruser
: Your email addresspassword
: Your email account password, likley to be an app password
-
[telegram]
section:api_id
: Your Telegram API IDapi_hash
: Your Telegram API hashbot_token
: Token of the Telegram bot for forwarding messageschannel_id
: ID of the Telegram channel to forward messages to
This project is licensed under the MIT License.