https://www.dokuwiki.org/plugin:tgnotify
Installiert mit Konfiguration
5755797455:AAG1thd0vSE78kQ-2eWryMxdJ1MF5G3z1lM
GeoTest: Ireoluwa 5755 C:Userstypedevwebpage/ itbstelebot V1.4243sh <telebot.TeleBot object at 0x000001DC64B3A970>
8146165091:AAG6a7ah8VfxXB9qcP4BOnNnUs8haMPf5As
ibSERVER 8146 /volume1/userapps/dev/ ibwatelebot V1.42432 <telebot.TeleBot object at 0x7f9572119370>
https://api.telegram.org/bot8146165091:AAG6a7ah8VfxXB9qcP4BOnNnUs8haMPf5As/getMe
8329635550:AAGLmwCWoTyCfrPQTWlDvJQoczesddHnD6Q
{„ok“:false,„error_code“:401,„description“:„Unauthorized“} oder {„ok“:true,„result“{
}
8097743994:AAFrhJw1oos9IdbCUSLIwgHRXnM2cpmpdzk
https://t.me/jenniespapabot Telegram @jenniespapabot
Stefan aus Berlin: Papabot jenniespapabot
BotFather: Done! Congratulations on your new bot. You will find it at t.me/jenniespapabot. You can now add a description, about section and profile picture for your bot, see /help for a list of commands. By the way, when you've finished creating your cool bot, ping our Bot Support if you want a better username for it. Just make sure the bot is fully operational before you do this.
Use this token to access the HTTP API: 8097743994:AAFrhJw1oos9IdbCUSLIwgHRXnM2cpmpdzk Keep your token secure and store it safely, it can be used by anyone to control your bot.
For a description of the Bot API, see this page: https://core.telegram.org/bots/api
Done! Congratulations on your new bot. You will find it at t.me/BLM_Geotest_Bot. You can now add a description, about section and profile picture for your bot, see /help for a list of commands. By the way, when you've finished creating your cool bot, ping our Bot Support if you want a better username for it. Just make sure the bot is fully operational before you do this.
Use this token to access the HTTP API: 5755797455:AAG1thd0vSE78kQ-2eWryMxdJ1MF5G3z1lM Keep your token secure and store it safely, it can be used by anyone to control your bot.
„chat_id“:„288639434“
For a description of the Bot API, see this page: https://core.telegram.org/bots/api
<Response [200]>
{
'ok': True,
'result': []
}
stefan@itbsSynology:/volume1/SynologyProgDaten$ ./telegrambotcode.py
<Response [200]>
{
'ok': True,
'result': [{
'update_id': 257038103,
'message': {
'message_id': 4,
'from': {
'id': 288639434,
'is_bot': False,
'first_name': 'Stefan',
'last_name': 'aus Berlin',
'username': 'Stefan_aus_Berlin',
'language_code': 'de'
},
'chat': {
'id': 288639434,
'first_name':
'Stefan',
'last_name': 'aus Berlin',
'username': 'Stefan_aus_Berlin',
'type': 'private'
},
'date': 1667831275,
'text': 'cool'
}
}
]
}
#!/usr/bin/env python3 import requests import json import datetime import sys from pprint import pprint with open("GeoTestToken.txt") as file: token = file.read() answer = requests.get(f"https://api.telegram.org/bot{token}/getUpdates") #if answer=="<Response [200]>": if answer.status_code == 200: content = answer.content data = json.loads(content) pprint(data) zeit = datetime.datetime.now() name = sys.argv[0][2:-3] print(name,zeit) params = {"chat_id":"288639434", "text":f"{name} Skript ausgeführt"} url = f"https://api.telegram.org/bot{token}/sendMessage" message = requests.post(url, params=params)
DQrD<7!A rs288@blmgeotest.de