0
I have a simple Python script that sends a post request with a certain payload but it returns error 500. I’d really like someone to help me.
The code:
def answered(self,answer):
headers = {
"Accept": "application/json, text/plain, */*",
"Accept-Encoding": "gzip, deflate",
"Accept-Language": "pt-BR,pt;q=0.9,en-US;q=0.8,en;q=0.7",
"apikey": "<API KEY HERE>",
"Cache-Control": "no-cache",
"Connection": "keep-alive",
"Content-Length": "69",
"Content-Type": "application/json;charset=UTF-8",
"device-Id": "b0fa2eee-66ba-4b23-99fe-c2cfeee7cc70",
"Host": "giga.unitel.ao",
"If-Modified-Since": "Mon, 26 Jul 1997 05:00:00 GMT",
"Origin": "http://giga.unitel.ao",
"Pragma": "no-cache",
"Referer": "http://giga.unitel.ao/",
"token": "<TOKEN HERE>",
"txId": "d9f98598-0251-4319-88ed-ef729ec872ec",
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36",
}
payload = {
"moveId":4628870481,
"index":1,
"help":"null",
"time": 20,
"optional":"null"
}
answer = requests.post("http://giga.unitel.ao/api/game/answer",data=payload, headers=headers)
print(answer)
URL portal: http://giga.unitel.ao
@imonferrari, here’s another question!
– Joa Roque
Error 500 is server error. You can point to the API documentation of this site?
– Paulo Marques