Ajout de chat a Monitor_Saclay
This commit is contained in:
20
app/Test_Chat.py
Normal file
20
app/Test_Chat.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import json
|
||||
import requests
|
||||
|
||||
WEBHOOK_URL = "https://192.168.1.250/webapi/entry.cgi?api=SYNO.Chat.External&method=incoming&version=2&token=UN7nhD70vrhrHFh1VeDdOpsklIHiIFRop2qB7b6YusMEY3clY3R8CXe4hFzz4KKc"
|
||||
|
||||
payload = {
|
||||
"text": "✅ Test VPS vers Synology Chat"
|
||||
}
|
||||
|
||||
try:
|
||||
r = requests.post(
|
||||
WEBHOOK_URL,
|
||||
data={"payload": json.dumps(payload, ensure_ascii=False)},
|
||||
timeout=10,
|
||||
verify=False
|
||||
)
|
||||
print("HTTP:", r.status_code)
|
||||
print("Réponse:", r.text)
|
||||
except Exception as e:
|
||||
print("Erreur:", repr(e))
|
||||
Reference in New Issue
Block a user