Duplicate Requests - Stack Exchange API

Duplicate Requests

Discussion

Sometimes, especially with spotty internet connections, a client can make a request to the API that is serviced but for which a response is never received. For example, an application may submit an upvote but due to loss of connectivity never receive an acknowledgement.

A reasonable solution to poor networking is to retry unacknowledged requests a small number of times. However, many actions can only be performed once leading to "mysterious" failures if an retried request actually succeeded earlier.

Starting in v2.2, the API accepts a request_id parameter along with every request. If a request_id is seen a second time in a small window the request will be failed immediately with a duplicate_request error. this means that any retried requests will fail sensibly, provided that the same request_id is used.

The exact window in which the API will recognize a duplicate request_id is subject to change, but clients can assume the window is no shorter than five minutes.

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.