Box Long polling

Box - Long polling

To get real-time notification of activity in a Box account, use the long poll feature of the /events API. To do so, first call the /events API with an OPTIONS call to retrieve the long poll URL to use. Next, make a GET request to the provided URL to begin listening for events. If an event occurs within an account you are monitoring, you will receive a response with the value new_change. It???s important to note that this response will not come with any other details, but should serve as a prompt to take further action such as calling the /events endpoint with your last known stream_position. After sending this response, the server will close the connection and you will need to repeat the long poll process to begin listening for events again. If no events occur for a period of time after you make the GET request to the long poll URL, you will receive a response with the value reconnect. When you receive this response, you???ll make another OPTIONS call to the /events endpoint and repeat the long poll process. If you receive no events in retry_timeout seconds, you should make another GET request to the real time server (i.e. URL in the response). This might be necessary in case you do not receive the reconnect message in the face of network errors. If you receive max_retries error when making GET requests to the real time server, you should make another OPTIONS request.

Posted on:


API Description




Box is changing how you manage content across your business from simple file sharing to building custom apps.

Curl command through

curl -v "{streamdata_token}"

Return to Main Page

Submit Your API

Join the gallery to find out how much you can save with