box-api

Content-transfer-encoding: BASE64 BOX-API

北城余情 提交于 2019-12-11 05:32:00
问题 I would like to know if "Content-transfer-encoding: BASE64" used inside multipart HTTP POST request body is supported by BOX. The problem I have is that I generated the following body: -------boundary Content-Disposition: form-data; name="filename"; filename="82b.gif" Content-Type: image/gif Content-Transfer-Encoding: BASE64 $base64_encoded_binary_file_content -------boundary Content-Disposition: form-data; name="parent_id" 123456789 -------boundary-- and sent the http request to https:/

Authentication with Box on iPad

寵の児 提交于 2019-12-11 04:44:45
问题 I'm adding Box support to an iPad app. I tried the official SDK and I don't want to use it for the following reasons: Login page is too wide for a modal controller with UIModalPresentationFormSheet style on iPad. The SDK hosts UIWebView which loads content of https://m.box.net/api/1.0/auth/, which perhaps returns HTML with min width set to 768px (although I didn't check the HTML, speculating here). HTML in login page doesn't show Google Apps authentication option. The full desktop version of

Box API 2.0 downloading file

十年热恋 提交于 2019-12-11 04:21:34
问题 Trying to use the new API to download a file. But am getting an error (NotFound) With the old API i downloaded fine: wcGetFile.DownloadStringAsync(new Uri("https://www.box.net/api/1.0/download/" + auth_token + "/2111821875")); With the new API this is my code: wcGetFile.Headers[HttpRequestHeader.Authorization] = "BoxAuth api_key=" + api_key + "&auth_token=" + auth_token; wcGetFile.DownloadStringAsync(new Uri("https://api.box.com/2.0/files/2111821875/data")); The file does exist because if i

405 Method Not Allowed

坚强是说给别人听的谎言 提交于 2019-12-11 03:03:10
问题 I've trying to access https://api.box.com/2.0/files but i receive Expected status code in (200-299), got 405 in my response (from AFNetworking). Before sending the request i've get my auth_token from the server. Code - (void)getFileListing:(NSString*)apiKey { if(apiKey == nil) { apiKey = kBoxNetApiKey; } NSDictionary *boxAuth = [[NSUserDefaults standardUserDefaults] objectForKey:kBoxNetUserDefaultsKey]; if([boxAuth objectForKey:@"auth_token"] != nil) { NSURL *url = [NSURL URLWithString:@

How to create shared link in box using java sdk

为君一笑 提交于 2019-12-10 23:51:33
问题 Can any one help me on how to create shared link in BOX using java SDK. I am using below code:- BoxFile file = new BoxFile(api, ID); BoxSharedLink.Permissions permissions = new BoxSharedLink.Permissions(); permissions.setCanDownload(true); permissions.setCanPreview(true); Date unshareDate = new Date(); BoxSharedLink sharedLink = file.createSharedLink( BoxSharedLink.Access.OPEN, unshareDate, permissions); Getting error :- The API returned the error code: 400 {"type":"error","status":400,"code"

Return list of all users in BOX Enterprise Account

自作多情 提交于 2019-12-10 22:18:24
问题 I would like to export a list of all users in our Enterprise account. However, it would seem that my co-admin credentials fail to execute the example request listed in the BOX.com API 2.0 documentation: curl https://api.box.com/2.0/users -H "Authorization: Bearer ACCESS_TOKEN" The documentation indicates that this should return the current user's information if executed by a non-admin. However, in my case I am receiving a 403 Forbidden error. Am I missing something or executing this wrong?

Access denied error message when trying to create a shared link to a folder in Box

限于喜欢 提交于 2019-12-10 21:13:35
问题 So following on from my previous question around permissions to add collaborators, I am now having further permissions issues when trying to create a shared link to a folder in Box using the API. So to confirm, I have the "Manage an enterprise" scope now enabled on the API account. Here is the error message I am getting back: {"type":"error","status":403,"code":"access_denied_insufficient_permissions","help_url":"http:\/\/developers.box.com\/docs\/#errors","message":"Access denied -

How to enhance Box.com API requests limit

亡梦爱人 提交于 2019-12-10 16:32:20
问题 As wrote here http://blog.programmableweb.com/2013/01/11/opening-up-the-box-api/ box.com limits number of requests to its API on per developer (or client in terms of OAuth RFC) basis. "The current rate limit is 50,000 requests per developer in a 24 hour rolling window." Can some1 guide me is there a way to enhance this limt? Cant find anything about it on the site. 回答1: The rate limit is actually much more granular (different calls are limited differently), and quite a bit higher than what

Box webhooks deprecated in favor of long polling?

走远了吗. 提交于 2019-12-10 11:37:20
问题 The developer docs for Events do not mention webhooks at all. Are they being phased out in favor of long polling for events or can we still use them? 回答1: They are still a valid way to integrate with Box. The link you provide is the current documentation for it. I'll see if we can get a couple pointers to that webhooks documentation put into the relevant places on the rest of the docs. 来源: https://stackoverflow.com/questions/20320795/box-webhooks-deprecated-in-favor-of-long-polling

Using As-User in Box Request

六月ゝ 毕业季﹏ 提交于 2019-12-07 07:15:08
问题 I was trying to make Box Enterprise API work using As-User. I have a admin account which i used to try to retrieve the Contents in a sub account. I first used the admin account to retrieve the User ID of the sub account. And added the User ID as a field "As-User: ########". However, I was returned with a reply of 403. The error message : "The request requires higher privileges than provided by the access token." I am using the access token i had used to retrieve the user list. Do I have to