---
title: "Get events long poll endpoint"
method: OPTIONS
path: "/events"
tags: ["Events"]
---

# Get events long poll endpoint

`OPTIONS /events`

Returns a list of real-time servers that can be used for long-polling updates
to the [event stream](https://developer.box.com/reference/get-events).

Long polling is the concept where a HTTP request is kept open until the
server sends a response, then repeating the process over and over to receive
updated responses.

Long polling the event stream can only be used for user events, not for
enterprise events.

To use long polling, first use this endpoint to retrieve a list of long poll
URLs. Next, make a long poll request to any of the provided URLs.

When an event occurs in monitored account a response with the value
`new_change` will be sent. The response contains no other details as
it only serves as a prompt to take further action such as sending a
request to the [events endpoint](https://developer.box.com/reference/get-events) with the last known
`stream_position`.

After the server sends this response it closes the connection. You must now
repeat the long poll process to begin listening for events again.

If no events occur for a while and the connection times out you will
receive a response with the value `reconnect`. When you receive this response
you’ll make another call to this endpoint to restart the process.

If you receive no events in `retry_timeout` seconds then you will need to
make another request to the real-time server (one of the URLs in the response
for this endpoint). This might be necessary due to network errors.

Finally, if you receive a `max_retries` error when making a request to the
real-time server, you should start over by making a call to this endpoint
first.

## Response `200`

Returns a paginated array of servers that can be used
instead of the regular endpoints for long-polling events.

- RealtimeServers — A list of real-time servers that can be used for long-polling.
  - `chunk_size` integer — The number of items in this response.
  - `entries` RealtimeServer[] — A list of real-time servers.
    - `type` string — The value will always be `realtime_server`.
    - `url` string — The URL for the server.
    - `ttl` string — The time in minutes for which this server is available.
    - `max_retries` string — The maximum number of retries this server will allow before a new long poll should be started by getting a [new list of server](https://developer.box.com/reference/options-events).
    - `retry_timeout` integer — The maximum number of seconds without a response after which you should retry the long poll connection. This helps to overcome network issues where the long poll looks to be working but no packages are coming through.

## Other responses

- `default` — An unexpected client error.

---

[API](https://skmtc.net/box/apis/platform-api.md) · [All operations](https://skmtc.net/box/apis/platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/box/platform-api/versions/ba8f087e1a4d/schema)
