Skip to main content
GET
/
files
/
{file_id}
/
content
cURL
curl -i -L -X GET "https://api.box.com/2.0/files/12345/content" \
     -H "authorization: Bearer <ACCESS_TOKEN>" \
"<string>"
This endpoint is in the version 2024.0. No changes are required to continue using it. For more details, see Box API versioning.Learn more about Box SDK versioning strategy.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

range
string

The byte range of the content to download.

The format bytes={start_byte}-{end_byte} can be used to specify what section of the file to download.

boxapi
string

The URL, and optional password, for the shared link of this item.

This header can be used to access items that have not been explicitly shared with a user.

Use the format shared_link=[link] or if a password is required then use shared_link=[link]&shared_link_password=[password].

This header can be used on the file or folder shared, as well as on any files or folders nested within the item.

Path Parameters

file_id
string
required

The unique identifier that represents a file.

The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL https://*.app.box.com/files/123 the file_id is 123.

Query Parameters

version
string

The file version to download.

access_token
string

An optional access token that can be used to pre-authenticate this request, which means that a download link can be shared with a browser or a third party service without them needing to know how to handle the authentication. When using this parameter, please make sure that the access token is sufficiently scoped down to only allow read access to that file and no other files or folders.

Response

Returns the requested file if the client has the follow redirects setting enabled to automatically follow HTTP 3xx responses as redirects. If not, the request will return 302 instead. For details, see the download file guide.

The binary content of the file.