API response - "illegal timestamp"
Posted: Wed Mar 26, 2025 12:29 pm
I've started getting an error back from the FoxESS API as of the last couple of days.
I've not changed anything in my code, and the headers look something like this:
The timestamp and signature are generated using (in Python):
Any idea what could be causing this?
Code: Select all
{'errno': 40256, 'msg': 'Parameter could not be parsed correctly illegal timestamp'}
Code: Select all
{
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36',
'lang': 'en',
'signature': '<signature>',
'timestamp': '1742992131498',
'token': '<uuid>'
}
Code: Select all
timestamp = round(time.time() * 1000)
signature = fr'{path}\r\n{token}\r\n{timestamp}'