What is the logic behind X-Ratelimit-Reset?

Hi team,

I was looking at the X-Ratelimit-Reset returned in each response header and trying to understand what time it represents. It doesn’t seem to be represent 12AM GMT or any other timezone, so what is the logic behind the value of the X-Ratelimit-Reset value? Is it related to the time the account was created?

Also, has this bug been fixed?

Thanks.

Hi @abhiank

the x-ratelimit-reset value is still not working as expected for all endpoints.
However, in my test just now it seems to be pretty consistent for the /v2/directions endpoint at least.

If you are going to implement it somehow, better check for the endpoint you are using, if it is good enough for your needs.

The value is a timestamp for the UTC timezone in unix format.

Best regards

Thanks for quick response @amandus.

I need it for /v2/directions so the value is indeed working fine for me as well. However, about the value itself, I’m currently receiving 1627939933 which is Monday, August 2, 2021 9:32:13 PM GMT. This seems like a arbitrary value and hence I was wondering how it came to be this value.

Also, about the x-ratelimit-remaining value, should I depend on that value to track when my daily limit is over or should I depend on http code 429 instead?

Best Regards,
Abhimanyu

Please see Strange error returned and missing return header - #2 by amandus
It depends on the time you used your quota again.

The safest way would be to depend on the http code. As i’m still unsure, whether the Header will act up again -.-

Best regards

It depends on the time you used your quota again.

Thanks I understand now.

The safest way would be to depend on the http code. As i’m still unsure, whether the Header will act up again -.-

Cool. Will use the header.

Thanks,
Abhi