import requests, os from dotenv import load_dotenv load_dotenv() pw = os.getenv('BOT') headers = { 'Content-Type': 'application/json', 'Accept': 'application/json', 'OCS-APIRequest': 'true', } data = '{"token": "xzntzmuh", "message": "test"}' response = requests.post('https://cloud1.sommerschein.de/ocs/v2.php/apps/spreed/api/v1/chat/xzntzmuh', headers=headers, data=data, auth=('Maily', 'pw')) print(response.content)