box-api

Connecting via oAuth2 with jQuery/AJAX for Box.com

我只是一个虾纸丫 提交于 2020-06-23 14:48:37
问题 I'm trying to work with Box.com's API to develop a quick app that allows for Folder creation. I am having trouble connecting to their API and am fairly new to oAUTH2, API's, and whatnot. I've tried to follow these guides: http://developers.box.com/oauth/ http://developers.box.com/docs/#folders-create-a-new-folder The Box.com documentation says response_type: Whether the endpoint returns an authorization code. For web applications, a value of code should be used. client_id : The client_id you

upload file to box api v2

五迷三道 提交于 2020-02-07 08:24:07
问题 i am trying to upload a file to box.com with their v2 api. i am able to successfully upload a file with curl, but cannot upload a file from my rails application. i am passing my upload function the correct folder id and file is a tempfile object created by a form upload in my app. here is the successful curl command curl https://upload.box.com/api/2.0/files/data -H "Authorization: BoxAuth api_key=API_KEY&auth_token=TOKEN" -F contract=@test.png -F folder_id=387656851 -ssl3 and here is my ruby

Get all files in box account

爷,独闯天下 提交于 2020-01-24 20:49:25
问题 I need to fetch a list of all the files in a user's box account, such that the list of files can then be displayed in a table view (iOS). I have successfully implemented this by recursively using /folders/{folder id}/items on all the folder's in my user's box. However, while this works, it's kind of dirty, seeing as how a request is made for each of the users's folders, which could be quite a large number. Is there any way to get a list of all the files (it's no issue if folders are included,

getting file size for box files retrieved via box search

大兔子大兔子 提交于 2020-01-16 00:54:10
问题 My code is as follows: requestObj.addField(BoxFolder.FIELD_SIZE); BoxCollection itemCollection = client.getFoldersManager().getFolderItems(file.getId(), (BoxFolderRequestObject) requestObj); List<BoxTypedObject> objects = itemCollection.getEntries(); for (BoxTypedObject innerFile : objects) { System.out.println("=============" + innerFile.getExtraData(BoxFolder.FIELD_SIZE)); System.out.println("=============" + innerFile.getValue(BoxFolder.FIELD_SIZE)); } It returns null in both System.out I

console based application using box.com outh with out asking user to login and allow the app

半世苍凉 提交于 2020-01-15 04:56:05
问题 Here is my situation. I am developing a console based application using c#. Here we can not have user login. Only i can do is using api i need to get auth_code then access token and refresh token. I am very happy if somebody can answer, how to implement this in my console app. i mean how to get the auth_code with out asking user to login and allow the application. Here if i run a cURL command i am getting html response, which is the complete html for box login page. Regards, Pradeep 回答1: The

API 2.0 how to upload file with POSTMAN?

余生长醉 提交于 2020-01-14 04:41:26
问题 I'm reading API 2.0 documentation and try using POSTMAN (recommended in the documentation). In "Upload a file" section, I got "404 not found" error. for example: {"type":"error","status":404,"code":"not_found","help_url":"","message":"Unknown Error","request_id":"11139828924fa91c0d283d2"} POSTMAN window image is here. Base URL is tring "upload.box.com/api/2.0" (temporary, according to the document). What's wrong? 回答1: The domain specific Upload issues have all been resolved. You can now

Best way to upload files to Box.com programmatically

你离开我真会死。 提交于 2020-01-13 10:44:53
问题 I've read the whole Box.com developers api guide and spent hours on the web researching this particular question but I can't seem to find a definitive answer and I don't want to start creating a solution if I'm going down the wrong path. We have a production environment where as once we are finished working with files our production software system zips them up and saves them into a local server directory for archival purposes. This local path cannot be changed. My question is how can I

how to send form data in a programmatic file upload in box api 2.0

℡╲_俬逩灬. 提交于 2020-01-06 15:42:33
问题 Is the following a correct example of the form POST data in a file upload in the box api 2.0? The documentation says that the 'filename' form field is a string but when sending the post data in, say, python, you need to actually send the file contents in the post. So, is the content-disposition: form-data line below the correct way to name the 'filename' field and include the file contents? Content-type: multipart/form-data, boundary=AaB03x Content-length: 142 Authorization: BoxAuth api_key

BOX Access token API V2

情到浓时终转凉″ 提交于 2020-01-06 08:11:36
问题 I am trying to retrieve an Access Token from BOX.COM oauth2 and no matter what I do I get the same error. {"error":"invalid_request","error_description":"Invalid grant_type parameter or parameter missing"}. I have verified the client id, client secret and get a new code every time I try (the expire every 30 seconds). I have tried VB.NET, C# and even the RestClient plugin for FireFox. Below is the VB.NET code that I am using. Any help would be greatly appreciated! Thanks, Brian Public Sub

How to send curl update request with -d parameter?

不问归期 提交于 2020-01-06 06:00:27
问题 I need to send a curl request from powershell, using box api reference for help (I'm looking the the section called Update User , but I'm having some trouble: curl https://api.box.com/2.0/users/11111 -H @{"Authorization" = "token"} -d '{"name": "bob"}' -X PUT Should update the user's name, but I get: Invoke-WebRequest : A positional parameter cannot be found that accepts argument '{"name": "bob"}'. At G:\IT\bassie\Box\GetUsers.ps1:5 char:1 + curl https://api.box.com/2.0/users/892861590 -H @{