boxapiv2

Box API upload files to admin account instead of APP

我与影子孤独终老i 提交于 2019-12-25 15:55:20
问题 Hey I use the Box API and I successfull to upload my files but they are stored at the app storage folder. If you would go to the admin-console and then click the folder Icon you can see the admin folder and then the folder of the created app. How can I change the path that every upload will go to the admin folder that if I relog to box.com I would see all my files in the home folder instead of going to the admin-console every time? 回答1: This should work. var client = sdk.getAppAuthClient(

Box API upload files to admin account instead of APP

江枫思渺然 提交于 2019-12-25 15:54:51
问题 Hey I use the Box API and I successfull to upload my files but they are stored at the app storage folder. If you would go to the admin-console and then click the folder Icon you can see the admin folder and then the folder of the created app. How can I change the path that every upload will go to the admin folder that if I relog to box.com I would see all my files in the home folder instead of going to the admin-console every time? 回答1: This should work. var client = sdk.getAppAuthClient(

“As-User” header enabled with our enterprise admin account with Box.com [BOX-API.V2]

非 Y 不嫁゛ 提交于 2019-12-24 14:28:36
问题 I got "As-User" header enabled with our enterprise admin account with Box.com to impersonate other users and trying to use the previously generated token without refreshing/regenerating every time. When I am trying to connect Box.com thru my vb.net code, getting "Box returned HTTP Code Unauthorized (Unauthorized): " error. What I am doing wrong? Do i need to write any extra code? Do I need to compare the token generated file creation date with today's date for less than 60 days, in order to

How to download files with Box API & Python

我的梦境 提交于 2019-12-23 14:36:09
问题 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 token access_token = 'UfUNeHhv4gIxFCn5WEXHgBJwfG8gHT2o' #the name of the file as you want it to appear in box dst_filename = 'box_file' #the actual file path src_directory = 'C:\Python\cache\\' #the name of the file to be transferred src_filename =

java.lang.NoSuchFieldError: PUBLIC_ONLY while using Box api in android in signed build

萝らか妹 提交于 2019-12-23 08:18:26
问题 I have developed android application which contains Dropbox,Google drive and Box cloud service. I tested it and everything was working. After that I signed it and I realized that debug apk size was 8.5MB whereas signed apk size was 7MB.Still I tested complete application in which everything was working except Box cloud functionality.I got below exception 11-28 12:51:14.129: E/AndroidRuntime(2702): FATAL EXCEPTION: main 11-28 12:51:14.129: E/AndroidRuntime(2702): Process: com.idealtech.mycoud,

HTTP 500 when trying to upload a file

谁说我不能喝 提交于 2019-12-13 07:43:59
问题 Here is my Box upload POST to upload a file into a specific folder: POST /api/2.0/files/content HTTP/1.1 Authorization: Bearer ACCESS_TOKEN Accept: application/json User-Agent: SOASoftware/7-HttpCore/4 Transfer-Encoding: chunked Content-Type: multipart/form-data Host: upload.box.com Connection: Keep-Alive attributes='{"name":"lead.txt", "parent":{"id":"2890481033"}}'&file=C:\SOA\Software\sm70\instances\nd\leads.txt -----------------------------9051914041544843365972754266 <file-data> --------

how to use python's Request library to make an API call with an attachment and a parameter

风格不统一 提交于 2019-12-13 03:39:42
问题 I am using the Request library to test ReST APIs. I am facing a problem while trying to trasform the below cURL to request library Call. curl https://upload.box.com/api/2.0/files/content \ -H "Authorization: Bearer ACCESS_TOKEN" \ -F filename=@FILE_NAME \ -F parent_id=PARENT_FOLDER_ID I tried many of the suggestions in this forum. But nothing worked. The code which I addedd after the comment is: The code I wrote was: def upload_a_file(url, folder_id, file_name, access_token): field_values = "

Box API Node.js cant upload file 404 Error

混江龙づ霸主 提交于 2019-12-12 04:49:50
问题 I cant upload file with Box API my code: var sdk = new BoxSDK({ clientID: BOX_clientID, clientSecret: BOX_clientSecret }); // Create a basic API client var client = sdk.getBasicClient(BOX_accesstoken); var fileData = fs.createReadStream('C:\\Exports\\test.txt') client.files.uploadFile('123', 'test.txt', fileData, function(err, file) { if (err){ console.log('err: ' + err); } else{ console.log('file uploaded: ' + file); } }); // Get some of that sweet, sweet data! client.users.get(client

Unable to get folder by id using Boxr gem Ruby SDK for Box API

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 17:32:58
问题 I'm currently working on a Rails 5.2 application where I'm using FormStack form service. Formstack makes use of Box for it's storing services. I started using Boxr gem to interact with the Box API. To create a client you will need a developer token. client = Boxr::Client.new('{BOX_DEVELOPER_TOKEN}') However, this BOX_DEVELOPER_TOKEN expires every 60 minutes. So I decided to use JWT for authentication. So I generate the token the following way: token = Boxr::get_enterprise_token(private_key:

Is it possible to search Box items based on the metadata?

拜拜、爱过 提交于 2019-12-11 16:19:36
问题 API documentation below does not mention how to search based on the metadata. Is it really possible? Can someone point me to an example? https://developers.box.com/docs/#search thanks in advance! Milind 回答1: I had the same question and asked Box directly. This is the reply they sent me: You can only use the mdfilters parameter if you have a custom "template" in your enterprise account: https://box-content.readme.io/#metadata-object. The properties template doesn't work with the mdfilters