Questions tagged [box-api]

Questions about the API provided by Box, Inc. for their online storage service.

The Box API lets you create applications and web sites that integrate with Box. By leveraging Box's RESTful API, you can add simple, yet secure file management, sharing, and collaboration to your app.

Please consult http://developers.box.com for full API documentation.

Box, Inc. was formerly known as Box.net.

1055 questions
27
votes
7 answers

curl: (26) couldn't open file

I am getting this error, when I am trying to call a box api through curl. curl: (26) couldn't open file Can't find why! I am calling this api with a correct file name- curl https://upload.view-api.box.com/1/documents \ -H "Authorization: Token…
halkujabra
  • 2,844
  • 3
  • 25
  • 35
14
votes
1 answer

How to create the access token using app user id in Box-API?

I'm trying to create the access token using box app user id. I have use the following code to create the box app user curl https://api.box.com/2.0/users \ -H "Authorization: Bearer " \ -d '{"name": "Ned Stark", "is_platform_access_only":…
mkHun
  • 5,891
  • 8
  • 38
  • 85
14
votes
1 answer

Why do refresh tokens expire after 14 days

Each refresh token is valid for 14 days. Why do the refresh tokens expire?
yednamus
  • 582
  • 1
  • 4
  • 22
12
votes
3 answers

Get file ID of a given path

is there a direct method to get file ID by giving a path (e.g. /some/folder/deep/inside/file.txt)? I know this can be done by recursively checking folder's contents, but a simple call would be much better. Thanks
Zhizhong Liu
  • 141
  • 1
  • 4
11
votes
4 answers

How to download files with Box API & Python

I have currently the upload portion of my code working, how would I go about converting this into a program that will download the respective files from the box folder? This is the upload program: import requests import json #the user acces…
Steve-O
  • 387
  • 1
  • 4
  • 10
10
votes
5 answers

Box oauth2: Invalid grant_type parameter or parameter missing

I don't know what I do wrong, but everytime I tried to obtain the token (after user authentication of course), the result is always Invalid grant_type parameter or parameter missing Possibly related to Box API always returns invalid grant_type…
metric
  • 193
  • 1
  • 2
  • 9
10
votes
4 answers

box.com api OAuth authentication

Either I'm dense, or the docs assume I already know what they're telling me, but I need some clarification on doing authentication for a box.com app. I really don't understand whate's going on. As I read it: the app running on the user's machine…
user2026102
  • 101
  • 1
  • 1
  • 3
9
votes
3 answers

Working with the Box.com SDK for Python

I am trying to get started with the Box.com SDK and I have a few questions. from boxsdk import OAuth2 oauth = OAuth2( client_id='YOUR_CLIENT_ID', client_secret='YOUR_CLIENT_SECRET', …
Steve-O
  • 387
  • 1
  • 4
  • 10
8
votes
3 answers

How to get an access token without Box’s authorization page

I have been granted access(collaborate) in a folder. What I need is to access the folder daily and fetch files from it. Right now the developer token I generate expires in 1 hour. Is there a way I can get the authorization code without the first…
xiao
  • 1,718
  • 4
  • 23
  • 31
8
votes
5 answers

BOX v2 API for overwriting a file or checking one exists before trying to upload

I'm new to the BOX API so am using v2 of the API. I am making REST calls natively from my app. I want to upload a file which may or may not have been previously uploaded. I know the parent folder ID and the file name. I need to either overwrite an…
user2429938
  • 83
  • 1
  • 4
8
votes
3 answers

iOS BoxSDK returning nil for sharedLink

We need to create a shared link for a file and then retrieve that link so that we can display it inside our application. We are able to create a shared link for a specific file (we can see it inside Box Account on the Web) but we are not able to…
dtrsan
  • 158
  • 5
7
votes
1 answer

Is there any easy way to get folderID based on a given path?

Box api is implemented to be RESTful. and most supported methods are based on ids, folder_id or file_id. As a very beginning start point, a root folder id, 0, stands for the root directory /All Files/. from there (fold_id = 0), I can loop through…
user2259674
  • 101
  • 2
  • 5
7
votes
3 answers

Upload file using python requests

I've been trying to upload a file using the box v2 api with requests. So far I had little luck though. Maybe someone here can help me see what I'm actually doing wrong. file_name = "%s%s" % (slugify(sync_file.description), file_suffix) file_handle =…
Wurzelgogerer
  • 303
  • 2
  • 6
6
votes
3 answers

Where can I find my Enterprise ID for Box API?

I'm using the Box API SDK for .Net, and trying to set it up to use JSON Web Tokens instead of OAuth2. When I instantiate the BoxConfig object I need to provide the Enterprise ID: var config = new BoxConfig( clientId, clientSecret, enterpriseId,…
Mike G
  • 133
  • 1
  • 7
6
votes
2 answers

Upload a file to Box.com using Powershell

I am working on a series of Powershell scripts for my company to use to transfer data to and from Box.com. The one thing I just can't figure out is uploading files. The Box API requires a multipart POST operation for uploads, and I've seen a few…
Jeff Rosenberg
  • 3,522
  • 1
  • 18
  • 38
1
2 3
70 71