Just curious who is familiar with the WK API and if you know how they generate timestamps. I was able to create reviews earlier using my current timestamp in their format, but now trying to send the same requests is giving me a 422 with the following explanation: {‘error’: ‘created_at must be in the acceptable time range’, ‘code’: 422}
The interesting thing is that I can submit those reviews through the website or through other apps so I’m guessing it’s most likely an issue with my timestamp (crazy assumption I know). If you want a million brownie points maybe you could tell me how to generate the correct timestamp in Python.
It seems like it’s after the assignments available at date yeah, I’ll try it again later after the review period has elapsed I’m just getting some strange behavior.
Did you do any time zone conversion or did you generate it in UTC time directly? If the time zone specifier is off somehow you might accidentally end up generating time points in the future.
Do you have an example of a timestamp your current script generates (preferably with the actual time with it)? That way we can compare it a bit more easily.
The response you sent looks like a response the API would give you if you successfully create a review. I’m more curious as to what your request was when you got the error.
yeah like I said I sent the failed request with the same exact format after the review became available that had been reviewed with my previous API request, that’s why I was a little confused.
The only thing I can really see from your timestamp is that you’re missing the zone identifier at the end. It’s a bit hard to tell what caused the call to fail though. If you get the error again see if you can log the exact request, it’s hard to tell what went wrong this time.
available_at: 2021-02-19 21:00:00+00:00
my generated timecode and actual time: 2021-02-19T14:03:49.866335
<Response [422]>
{‘error’: ‘created_at must be in the acceptable time range’, ‘code’: 422}
Is there a timezone issue? If I go with the timestamps assuming they are in the same timezones your timecode is earlier than the avalable_at timestamp.