-
Recently active
Hi I’m currently developing an application for my research group that pulls our images from box and applies certain operations on those images to generate training data for our CV models. We want to make this application public through a repository, and we want users to be able to access our image data using JWT authentication (config file for authentication will be provided in the repository). However, we don’t want users to be able to write to the folders and change their image content. I thought of giving ReadOnly permissions, however, box developer console says write permissions are required to allow users to download the content. Below is the code that pulls the content of the image by img_id (image id). def download_image_from_box(self, img_id): """ Downloads image from Box storage """ # Get file and read image data into memory cache file = self.box_client.file(img_id) file_data = file.content() # Decode image src =
While searching on widget i am getting the following error, I have provided the following scopes using Java SDK while generating downscoped token. “base_explorer”, “item_preview”,“item_download”,“item_rename”,“item_delete”,“item_upload”. I don’t see any more scope that needs to be added to downscoped token for Content explorer widget’s search functionality.
Hi @matt.riley When I use the “metadata-query” and specify a folder Id(parent folder), does it show results for all files under that folder and other subfolders or only under the parent folder ? On the same note, I used the command on 1 folder that has 1 file and got the following error box metadata-query enterprise_287697.Testing --219563937307 Unexpected API Response [400 Bad Request | 037667ddf3edfef86c49bc5058f7841c1.037667ddf3edfef86c49bc5058f7841c1] too_many_instances - Too many instances, and no supporting index available
The generate downscoped token is valid for almost one hour. Let’s say i want to invalidate token after 20 minutes(Logout usecase). I am getting the following error, The API returned an error code {“error”:“invalid_request”,“error_description”:“The client is invalid”} The following specified code is not working. box-java-sdk/doc/authentication.md at main · box/box-java-sdk · GitHub Is there any other way, we can achieve this functionality ?
I have a custom Box App that is set up App Token (Server Authentication). This type of config creates a service account and gives us an access token. I’ve had no problem using the Box API in the past with this token as long as the associated service account is given access to the appropriate folers. However, calls to the Box SIGN parts of the API return the following: { “type”: “error”, “code”: “insufficient_scope”, “status”: 403, “message”: “The request requires higher privileges than provided by the access token.”, “help_url”: “http://developers.box.com/docs/#errors”, “request_id”: “0aa1e51ed7348b0df97959af0e579f7e6” } Our admin has granted Box Sign access to this service account and I even re-authorized the app just in case. But I’m still getting this permission error. Are service accounts allowed to use Box Sign API? Keep in mind this uses a static APP TOKEN. It does not use OAuth
Dear Box Community, We are currently using Box.V2 version 5.2.0 library for .NET to interact with Box documents. However, we periodically encounter the following error: “System.IO.IOException: The response ended prematurely”. This error occurs most frequently when using the GetFolderItemsAsync method, but occasionally with GetRepresentationContentAsync as well. It is important to note that this error does not occur for all folders, and after waiting and retrying the request for a specific folder, the method can execute successfully. For our most recent run, we set a timeout of 10 minutes for the HttpRequestHandler. However, based on the logs, it is evident that for the folders where the error occurred, the connection was terminated after approximately 8 minutes We would greatly appreciate any insights you can provide regarding the potential causes of this error, why the connection is being terminated before reaching the set timeout and any suggestions for resolving it. Thank you for y
We are developing a system using Java on Microsoft Azure AppService. I’m developing a feature that uses the Box API in a system I’m developing. Box API authentication is done via JWT using the SDK. An error occurs at “BoxDeveloperEditionAPIConnection api = BoxDeveloperEditionAPIConnection.getAppEnterpriseConnection(boxConfig);” at runtime. The error message is “class “org.bouncycastle.asn1.pkcs.rsapublickey”'s signer information does not match signer information of other classes in the same packag”. I am using Box SDK version 3.4.0. I would like to know the solution for this error.
Hi there, I have few folder on which i have given access to different users. Now to meet compliance I need to remove access after a certain frequency. I want to know ways through which i can remove this access (which i have given to 1000+ users) from a certain folder. Manually its very tedious. I can work in Java/python and cli…thanks for reading it. Thanks a ton.
Hi , i am not able to read Excel or CSV file from box drive using Java SDK , Whenever I am trying to read using Java SDK its going to login page ,even I did authentication in the previous step but no luck Is it really possible without downloading a file and directly reading from box drive.? Or am I missing anything? If so please guide me. Thanks in advance, SIVARAMAN A
Is there an easy way to get the number of pages of box file using a native Box api?
Hi folks, Check out the new blog article: Medium – 5 Jul 23 How to recursively upload a folder to Box using Python In this article, learn how to recursively upload files to Box using Python, while taking advantage of Box API features such as pre-flight… Reading time: 5 min read When uploading files recursively, we also need to check if the folders and files already exists, because the user may upload an entire folder a second and third time. Take a look at this example, where we use the prefilght_check to verify if the file can be accepted, and decide if we are uploading a new file or creating a new version of an existing one. Here is something to whet your appetite: def main(): """main app demo""" settings = get_settings() # check if sample folder exist and create them if not sample_folder = check_sample_folders(settings.sample_folder_base_dir) # get a client service_client = box_client_ge
Hi everyone, I’m new here and would appreciate your help with some questions I have about the Content Explorer. I’m trying to set it up so that the preview opens when I double-click an image in thumbnail view. Is there any way to achieve this? Currently, the preview only opens when I click on the filename or a button. I set ‘select’ for the event in addListener, but it’s triggering when I hit other buttons like the ‘share’ button. Is there a way to limit the ‘select’ event to only when a file is selected? Also, what would be the way to make the preview open again when clicking on the same file? Thanks for taking the time to read this Apologies in advance if I’ve posted this in the wrong topic, as this is my first time here.
Does the ability to specify a template file id in a document signing request exist is the SDKs yet? If so, I’d like some documentation for the Python SDK at least. Basically the same question was asked here by another but not sufficiently answered: Box Support Box Sign API - Template ID I have just been informed that template_id is a new POST body param, and while you can use template_id and it will utilize a template in the box sign request creation, it does not seem to be popula... Edit: Just noticed this: Introducing: Template APIs for Box Sign! Box Sign I can’t wait for this to be available in the SDK’s Stay tuned! Any movement on this? Thanks.
Following up with the Rusty Box: Creating a Rust client for a hackathon, we have released a crate with an initial implementation of the users API end points. You can find the crate here. You can follow up and participate in this open source project at this GitHub repo. If you want to try it: Create a new rust project cargo new my-box-project cd my-box-project Add rusty-box to your dependencies cargo add dotenv cargo add rusty-box Create a .dev.env file in the root of your project DEVELOPER_TOKEN=YOUR_DEVELOPER_TOKEN Open your main.rs file and add the following code use rusty_box::{ auth::{auth_developer::DeveloperToken, AuthError}, box_client::BoxClient, config::Config, rest_api::users::users_api, }; use std::env; #[tokio::main] async fn main() -> Result<(), AuthError> { dotenv::from_filename(".dev.env").ok(); let config = Config::new(); let auth = DeveloperToken::new( config, env::var("DEVELOPER_TOKEN").expect("DEVELOPER_TOKEN
Hello, I am using Box API Python SDK to list files. The metadata of files is important for my work. The files in the source folder are uploaded by myself and I am in UTC+09:00 timezone. But when I list the files using the API, all the timestamps returned by the API are in UTC-07:00. Please let me know if that is the default case? or is there anything I can do. SDK Version: 2.7.1 API: client.search.query(...) Thank you 🙂
Hello, I am having issues using the box-ui-elements React package. I have gotten the other “simpler” react components to work correctly with a developer token, but for w/e reason the ContentPreview component never renders the preview of the file. There are 0 errors in the console and if I enable the header it is able to display the file name correctly. So, the file ID is correct and the dev token is accurate since it works with other components on the same screen. Is this a known issue? It doesn’t seem like a sizing issue since it’s given plenty of space and the other components work just fine. Is there a working example repo I could run and supply my dev token & file ID to and see if it works? I ended up just using the raw JS CDN approach that some of the Docs outline to display the ContentPreview and that works just fine. So, I ended up just removing the entire box-ui-elements package since it wasn’t buying me much. I would like to actually use the package though since it is simp
Hi all, I have been currently tasked to automate the transfer of reports on a network drive to a shared folder on box. I was told to use box cli in conjunction with batch scripting to complete this. I have hit a roadblock in the creation of said script, and was looking for some additional perspective, as I may have missed a command or argument. Attached below is the “script” I tried to create for this project: robocopy "\\Network Folder" "\\Network Folder Archive" /MOV *.xlsx box folders:upload "\\Network Folder Archive" --parent-folder=(Shared Box Folder ID) The roadblock I have hit is in the transfer to box. Because box cli doesn’t overwrite folders, I cannot update the folder with new reports that come in. The other direction I wanted to take was to upload all of the files in the folder directly to box, but I couldn’t find a command to send all of the files to box at once. I experimented with the bulk csv commands, but because the monthly reports are going to have different file n
Hi, i’m new in programming. I’m developing a website that needs a Cloud. And our boss wants the BOX Cloud Services. I have little knowledge in API. I can’t a tutorial in youtube that specifically deals with how to integrate Box into a website, how to upload and retrieve data. Can someone please help me
Recently Box held an internal hackathon, and I participated exploring the idea of creating a Rust client for the Box API. What was I thinking? I wanted to see what it would take to build a Rust client for the Box API. Rust, my friends, is a powerful language designed for systems programming. It comes with a bunch of awesome features like memory safety, performance, concurrency, and developer productivity. So, why not harness its power? Sure, Rust may not be the easiest language to learn, but it’s like a strict teacher who won’t tolerate any errors easily. And you know what? I’ve come to appreciate its capabilities immensely. After working with Python for a while, I found myself yearning for a more disciplined approach, and Rust fit the bill perfectly. Now, you might be thinking, “But wait! Box already has SDKs for C#, Java, Python, Node, iOS, and Android. Do we really need Yet Another SDK (YASDK)?” Well, we’ve got you covered. If your favorite language isn’t on the list, you can always
Get started with the Box Python SDK, using OAuth 2.0 in under 3 minutes I was looking for a way to get developers started using the Box platform as quickly as possible. Although Box provides many authentication methods, a recent incident with free developer accounts forced Box to limit the options for new free developer accounts. So I’ve decide to create a Python template application with built in OAuth 2.0, ready to go, allowing you to immediately start sending requests to the API. Create a free Box individual account Navigate to the personal sign up page, fill in your information, and submit. No credit card required… Box registration page for free individual accounts Complete the registration process, verifying your email. Tip: If you have a gmail.com account and don’t want to create a brand new account just for this, you can use something like your.normal.email+box@gmail.com. You can also use this to create multiple free accounts on box under the same email, and still be able to d
Question from developer: When working with BoxCLI or the Node SDK, the examples reference a file path to a .pem file. How do I create a .pem file, and have it work with the box app?
Got an interesting question from a developer: I would like to maintain the tags assigned to Box in bulk, is there any good solution? I was considering a way to use Box CLI, but the description of the CSV template does not mention tags, so I am looking for a solution. What I want to achieve and the conditions are as follows. What we want to achieve: I want to change the tags assigned to files in bulk with CLI. (e.g. tagA→tagB) I want to delete all tags assigned to files in bulk with CLI. Conditions: I am not an admin user. I am an ordinary user of a company.
Got an interesting question from a developer: Hi Team iI am new to Box REST API. Is it possible to download folder and all of its sub folder/files in 1 call ? if yes, whats the code for that in Python? I checked available docs and at link https://developer.box.com/guides/downloads/folder/ I can see there is some code to download folder contents but thats in .Net, Java and Node. Do we have something in python?
Got an interesting question from a developer: I have been provided a box folder from another user for me to upload files. I have a lot of files to upload to this folder. I created a personal account so I can get access. The files are on a remote Linux box. Is there a convenient way to bulk upload these files from the command-line? I’ve tried different ways (SFTP, generating access token, etc) but having issues with one restriction or another. I posted to your community support page but haven’t heard back. What’s the best way to bulk-upload from Linux to Box?
Got an interesting question from a developer: I am accessing box to download an xlsx file, the file gets downloaded, yet it is corrupted, may you help ? thanks in advance file_id = '1234' download_file = client.file(file_id).get() transfer_file = open("/home/wsuser/work/" + download_file.name, 'wb') download_file.download_to(transfer_file)
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.