import requests data = { 'channel': '99x', 'called_number': '135xxx', 'tts_code': 'TTS_xx', 'tts_param': {'msg': '【温馨提示】:你好,我叫马昌伟,你是谁'}, 'play_times': 3, 'volume': 100, 'speed': -100, } #报警通知:msg 请尽快处理 url='https://aws-sts-xxx/notice/api/voice/' respose = requests.post(url=url, json=data) print(respose.text) print(respose.json())
{"status": 200, "msg": {"Message": "OK", "RequestId": "43FF511A-E453-5E5B-87B4-293C861A5325", "CallId": "142304643758^129054978759", "Code": "OK"}}
{'status': 200, 'msg': {'Message': 'OK', 'RequestId': '43FF511A-E453-5E5B-87B4-293C861A5325', 'CallId': '142304643758^129054978759', 'Code': 'OK'}}