Easily Integrate
Box's API using Konfig's TypeScript SDK
Growing API Companies trust Konfig's SDKs to onboard developers to their API.





First, instantiate the SDK
It only takes a few lines of code.
Then, send your first request
We made it really easy.
Enjoy a buttery smooth developer experience with 263 SDK methods
Parameter
The type of response we'd like to receive.
The Client ID of the application that is requesting to authenticate
the user. To get the Client ID for your application, log in to your
Box developer console and click the Edit Application link for
the application you're working with. In the OAuth 2.0 Parameters section
of the configuration page, find the item labelled client_id
. The
text of that item is your application's Client ID.
The URI to which Box redirects the browser after the user has granted
or denied the application permission. This URI match one of the redirect
URIs in the configuration of your application. It must be a
valid HTTPS URI and it needs to be able to handle the redirection to
complete the next step in the OAuth 2.0 flow.
Although this parameter is optional, it must be a part of the
authorization URL if you configured multiple redirect URIs
for the application in the developer console. A missing parameter causes
a redirect_uri_missing
error after the user grants application access.
A custom string of your choice. Box will pass the same string to the redirect URL when authentication is complete. This parameter can be used to identify a user on redirect, as well as protect against hijacked sessions and other exploits.
A space-separated list of application scopes you'd like to authenticate the user for. This defaults to all the scopes configured for the application in its configuration page.
Response
Endpoint
Parameter
Response
A token that can be used to make authenticated API calls.
An OAuth 2.0 error
An OAuth 2.0 error
Endpoint
Parameter
Response
A token that can be used to make authenticated API calls.
An OAuth 2.0 error
An OAuth 2.0 error
Endpoint
Parameter
Response
Returns an empty response when the token was successfully revoked.
An OAuth 2.0 error
An OAuth 2.0 error
Endpoint
Parameter
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
.
Ensures this item hasn't recently changed before making changes.
Pass in the item's last observed etag
value
into this header and the endpoint will fail
with a 412 Precondition Failed
if it
has changed since.
Response
Returns an empty response when the file has been successfully deleted.
A generic error
A generic error
A generic error
A generic error
A generic error
Endpoint
Parameter
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
.
A comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response.
Be aware that specifying this parameter will have the effect that none of the standard fields are returned in the response unless explicitly specified, instead only fields for the mini representation are returned, additional to the fields requested.
Additionally this field can be used to query any metadata
applied to the file by specifying the metadata
field as well
as the scope and key of the template to retrieve, for example
?fields=metadata.enterprise_12345.contractTemplate
.
Ensures an item is only returned if it has changed.
Pass in the item's last observed etag
value
into this header and the endpoint will fail
with a 304 Not Modified
if the item has not
changed since.
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.
A header required to request specific representations
of a file. Use this in combination with the fields
query
parameter to request a specific file representation.
The general format for these representations is
X-Rep-Hints: [...]
where [...]
is one or many
hints in the format [fileType?query]
.
For example, to request a png
representation in 32x32
as well as 64x64
pixel dimensions provide the following
hints.
x-rep-hints: [jpg?dimensions=32x32][jpg?dimensions=64x64]
Additionally, a text
representation is available for all
document file types in Box using the [extracted_text]
representation.
x-rep-hints: [extracted_text]
Response
A full representation of a file, as can be returned from any file API endpoints by default
Returns an empty response when the If-None-Match
header matches
the current etag
value of the folder. This indicates that the folder
has not changed since it was last requested.
A generic error
A generic error
A generic error
A generic error
A generic error
Endpoint
How Konfig Works
Konfig collects APIs and automatically generates SDKs so you can focus on building your application.
Konfig maintains the highest quality collection of OpenAPI Specifications on the internet in a GitHub repository
We pull OpenAPI Specifications from public sources, fix any errors, and make sure they pass our lint rules. We continually make sure the repository is up-to-date and collect up-time and response time metrics for every API.

Generates AI-Augmented SDKs from openapi-examples
Our SDK generator is trusted by growing API companies and goes through a rigorous testing process to ensure the generated SDKs are high-quality and easy to use.

Publishes to standard package managers
We publish to standard package managers like npm, PyPI, and Maven so you can easily integrate the SDK into your application.

About Box
Box (NYSE:BOX) is the Cloud Content Management company that empowers enterprises to revolutionize how they work by securely connecting their people, information and applications. Founded in 2005, Box powers more than 87,000 businesses globally, including AstraZeneca, General Electric, P&G, and The GAP. Box is headquartered in Redwood City, CA, with offices across the United States, Europe and Asia. To learn more about Box, visit http://www.box.com/.