我正在使用带有以下代码的 Python 请求包:
APIKEY = "XXX"
url = 'https://services.kommunicate.io/rest/ws/message/v2/send HTTP/1.1'
myobj = {
'groupId': "xxx",
'message':'Hello',
"fromUserName":'yyy'
}
headers = {
'Api-Key':APIKEY,
}
response = requests.post(url, data = myobj,headers=headers)
并给我以下错误:
'{"status":"error","errorResponse":[{"errorCode":"AL-MA-01","description":"method not allowed","displayMessage":"Request method \\u0027POST\\u0027 not supported"}],"generatedAt":1591385905404}'
我究竟做错了什么?