A community space to collaborate on Box APIs, explore SDKs, and build powerful applications
Recently active
Hello! Just wondering if anyone else has been getting a lot of 104 Connection reset errors being sent from the Python BoxSDK client. We have an API set up to receive webhook events from Box but will receive 104 connection events randomly that seem to cause an error executing the webhook endpoint. Most of the time it executes fine but when there is an error I noticed the 104 connection reset state will persist for a bit blocking the endpoint from executing properly. Wondering if there is a way to limit the amount of resets the boxclient will do to prevent blocking from what Im assuming is the retry logic.
I have created a box custom-app, with web integration and configured it as per the documentation. I can see my integrations in the context menu of files/folders and it is working as expected. However, the integration is not visible to other users. attached are the screenshots of my custom application and web-integration configurations. I can see the application with status as enabled., in “My Apps” in developer console. I have added another developer as a collaborator. He still can’t see the web-integrations. Web Integration configurations Integration status is set to Online (Visible for all users) In the Admin console., I have added the application using “ClientID” and it shows as enabled in the “User Authenticated Apps” list. But, still not available for any other users. In Box Cloud, When I try to search for Apps and My Apps, I can the application listed. But for other users, this is not available. This issue blocks my development and testing of box integration.
Hi I am trying to fetch files and folders in content explorer, using metadata query in node. I am facing below issues: Getting back all files and folders for a sponsorCode metadata as a response. But only files are getting displayed in content explorer. Folders are not getting displayed. Also the response is flattened and not structured as folder / subfolders /files. I have done implementation as below : Search for Folder using Metadata Query - Box Platform / API - Box Developer Community Can you pls help solve this?
In this YouTube tutorial by Box , at minute 1:58, they demonstrate a popup modal with a Box Sign embedded. It seems that this isn’t an iframeable_embed_url because the Cloud Game widget doesn’t pop up. When I use the iframeable_embed_url in my own modal, upon a user signing, instead of the user being shown a screen that says “Finished. Thank you for completing the request” like is shown upon sign completion in the YouTube tutorial, the Cloud Game widget pops up again. When the user completes this game (for a second time now), they then see a blank screen. This makes for a poor user experience because the user has no indication of whether or not their sign was successful. Is it possible for me to embed the embed_url into my modal instead (seemingly like what is done in the tutorial)? It seems like if I do so, the user won’t have to deal with the Cloud Game and weird sign completion experience. If not, what must happen for the user to be shown the “Finished. Thank you for completing the
We are migrating large data from One account to another account after impersonation. But we are getting below error: “PUT https://api.box.com/2.0/folders/168610592762” 503 191 {‘Date’: ‘Wed, 01 May 2024 07:27:04 GMT’, ‘Transfer-Encoding’: ‘chunked’, ‘strict-transport-security’: ‘max-age=31536000’, ‘box-request-id’: ‘0af1d3bebe91c1803d1d3929c585bd86c’, ‘x-envoy-upstream-service-time’: ‘600024’, ‘Via’: ‘1.1 google’, ‘Alt-Svc’: ‘h3=“:443”; ma=2592000,h3-29=“:443”; ma=2592000’} {‘code’: ‘—able’, ‘help_url’: ‘http://developers.box.com/docs/#errors’, ‘message’: ‘Service Unavailable’, ‘request_id’: ‘0af1d3bebe91c1803d1d3929c585bd86c’, ‘status’: 503, ‘type’: ‘error’} I am using below API for migration of folder: folder_to_move = source_client.folder(folder_id) destination_folder = target_client.folder(destination_folder_id) moved_folder = folder_to_move.move(parent_folder=destination_folder) why we are getting above issue. Will it be possible that it can migrate the large dataset even after ge
For all intents and purposes, I’m using cURL commands to operate my application. Project: I have a large number of folders (1000+) in the root of my application. Each folder has a standard structure of sub-folders, and within each sub folder there can be a large number of individual files (1000+). Need: I have a database with associated records. Each record is given an identifier (UUID). I created a metdata template with one field called UUID. Goal is to add a metadata instance to related files and folders with associated UUID. When you pull up the record in the database, application will search all metadata for UUID, and return appropriate files. Problem: I have successfully done so with files. Added metadata instance, search for UUID, and found list of files (99% of the time it returns just one). I have NOT been able to do so with folders. I need to be able to search for a metadata instance on a “folder” and retrieve it. Because of the sheer number of folders, list_items_in_f
We are building an Integration in the box cloud: 1. Application Type: Custom App 2. Authentication Type: OAuth 2.0 3. Context Menu items are added using “Web Integration” The Web Integration (Context Menu) Configuration is: Supports all file extensions Integration Type is “Files” We are using BOX-NODE-SDK, to get the file details from the received fileId. On click of the web-integration, we received the authCode and fileIdin the API., Using the AuthCode, we successfully fetched the AccessToken. const sdk = new BoxSDK({ clientID: BOX_INTEGRATION_CLIENT_ID, clientSecret: BOX_INTEGRATION_CLIENT_SECRET, }); sdk.getTokensAuthorizationCodeGrant(authCode, null, function (err, tokenInfo) { const boxClient = sdk.getPersistentClient(tokenInfo); boxClient.files.get(fileId).then((file: any) => { logger.info(file); }) } The above code sample returns the file details, but the path-collection is missing in the response. Under the path-collection object, the entri
Hi there- This is regarding the box ui library on Github and the below issue. github.com/box/box-ui-elements Support for React 18 opened 09:04AM - 08 Aug 23 UTC yaelsch We recently upgraded to react 18 and noticed that the drag and drop functionalit…y of the content uploaded is effected. If you drop two files to the drop zone, only one appears in the list. I downgraded to react 17 and made sure that indeed the cause to the bug is react 18. I noticed in your documentation that you currently don't support react 18, do you have plans to upgrade soon? Or alternatively, is there a way to workaround this issue? Is this library actively maintained and are there plans to update this package for compatibility with React 18? We have an internal tool that we would like to integrate with Box, however, it
I am a bit confused about the application type and authentication method best suited for my use case. I want to build an application, which should be published into the box app centre. The application should add context menu items to the existing box cloud Users with the box cloud account are the expected users. They will select a file or folder and click the context menu option. Context menu item click - should invoke our API., with information about the selected file or folder. The application should have permission to download and upload files. The main concern is that I want a long-lived token. I don’t want to re-authenticate for every call of a user a short-lived token. If multiple Organizations installed the application, How do we differentiate the organization? Thanks, Sarin
Trying to build an Integration in box cloud: Application Type: Custom App Authentication Type: OAuth 2.0 Context Menu items are added using “Web Integration” My Web Integration (Context Menu) Configuration is: Supports all file extensions Integration Type is “Files” Everything is working as expected when select a single file and perform the context menu action. However, my context menu option is not visible when I select multiple files.
Hello, all. Thank you in advance for the assistance. I am working on authenticating to box via JWT in python. I am currently authenticating like this: auth = JWTAuth( client_id='<CLIENT ID>', client_secret='<CLIENT SECRET>', enterprise_id='<ENTERPRISE ID>', jwt_key_id='<JWT KEY ID>', rsa_private_key_file_sys_path='/Users/folder/private_key.pem', rsa_private_key_passphrase='<PASSWORD>', ) access_token = auth.authenticate_instance() client = Client(auth) However, when I try and access my files in the box, I am not able to find any via code (even though there are certainly files in my account): client.folder('0').get() The interesting thing is that I am able to access all of the files and folders in my account if I use the development client, go into the developer console, and manually copy and paste an access token into the application: from boxsdk import DevelopmentClient client = DevelopmentClient() I was curious if anyone had a
Hi! im a new member. I have some questions: When i create an app, i see enterpriseid equal to 0? how do i have enterpriseid without 0. And i dont see Authorization tab like the docs.(https://developer.box.com/platform/user-types/) I want to use box-node-sdk to download file without limitation time login. for now i see it limited 60 mins with Developer Token. Is there a way to authorize without a time limit ( im using box-node-sdk)? It seems that authorizing with enterprise will not limit it, I’m not sure. If there is a limit, it will only be limited to a few days? thank you.
error: ‘invalid_grant’, error_description: “Please check the ‘sub’ claim. The ‘sub’ specified is invalid.”
I think the user will be directed to the URL below when authorizing the user using OAuth 2.0. https://account.box.com/api/oauth2/authorize?response_type=code&redirect_uri=xxxx&state=xxxx&client_id=xxxx When redirecting the user to the above URL, a problem occurs where a screen like the one below is displayed. https://account.box.com/login/mfa?redirectUrl=/api/oauth2/authorize?response_type=code&redirect_uri=xxxx&client_id=xxxx I’ve run into this problem several times and I’m guessing that the following conditions are causing this issue: ・2FA is enabled for your Box account stored in your browser’s cookies ・A certain amount of time has passed since you accessed the box using the above account on your browser. Currently, the following workarounds are being considered, but is there a fundamental solution? ・Use an incognito browser to prevent your Box account saved in cookies from being used. ・Access the approval URL again Similar questions have been asked in other env
Hello, I am currently experiencing an issue with two-factor authentication on BOX. When I attempt to access the authentication page, I am presented with a CORS (Cross-Origin Resource Sharing) error, which prevents me from completing the authentication process. Here is the error message I am seeing: Access to XMLHttpRequest at ‘h ttps://app.box.com/gen204? category=boomerang&event_type=beacon&&keys_and_values[current_rm]= box_oauth2_server_authorize&keys_and_values[datacenterTag]= us-west4-prod&keys_and_values[is_old]=1&keys_and_values[uri]= https%3A%2F%2Fapp.box.net%2Fapi%2Foauth2%2Fauthorize%3F … {snip} … &runmode_options[add_geo]=1’) from origin ‘h ttps://app.box.net’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. I have also attached a screenshot of the error for reference. I understand that CORS is a security feature implemented in web browsers to restrict requests from one domain to anot
I have a custom app registered/authorized by our Box admin with a permission scope of App+Enterprise , the C# client is using the Client Credentials Grant authentication method. I can get users in our Enterprise with the GetEnterpriseUsersAsync() method with no issue. However, it throws an exception of Box.V2.Exceptions.BoxAPIException : The API returned an error [Forbidden | figvvzhkcgjuvsex.02c4ce4ec440d4ba759f146d40493582d] forbidden - Forbidden when attempting to update a user via the .NET sdk UpdateUserInformationAsync method. C# code is as follows: _boxConfig = new BoxConfigBuilder(BOX_CLIENT_ID, boxClientSecret).SetEnterpriseId(BOX_ENTERPRISE_ID).Build(); _boxCCG = new BoxCCGAuth(_boxConfig); _boxClient = _boxCCG.AdminClient(); to update the user is coded as follows: public async Task UpdateUser(BoxUser user, string? setColleagueId = null) { var updates = new BoxUserRequest(); // pass the user properties into the updates object updates.Address = user.Address; updates.ExternalAp
Get HTTP 400 error when invoking upload file API (https://upload.box.com/api/2.0/files/content). The message says “Malformed stream”, but gives no additional information. Tried the exact payload as specified in this box documentation page (https://developer.box.com/guides/uploads/direct/file/) and run it in Postman and still get the same error. Request Payload: POST /api/2.0/files/content HTTP/1.1 Host: upload.box.com Authorization: Bearer [ACCESS_TOKEN] content-length: 343 content-type: multipart/form-data; boundary=------------------------9fd09388d840fef1 --------------------------9fd09388d840fef1 content-disposition: form-data; name="attributes" {"name":"test.txt", "parent":{"id":"0"}} --------------------------9fd09388d840fef1 content-disposition: form-data; name="file"; filename="test.txt" content-type: text/plain Test file text. --------------------------9fd09388d840fef1-- Error Response: { "code": "bad_request", "help_url": "http://developers.box.com/docs/#errors"
Here is my code: public uploadFiles = async (folderName: string, files: Blob[]) => { const folderId: string = await this.getFolderId(folderName); for (const file of files) { const stream: Readable = await blobToReadable(file); const attributes: UploadFileRequestBodyAttributesField = { name: file.name, parent: { id: folderId } } await this.boxClient.uploads.uploadFile({ attributes, file: stream }); } } const blobToReadable = async (blob: Blob): Promise<Readable> => { const buffer: Buffer = Buffer.from(await blob.arrayBuffer()); const stream = Readable.from(buffer); return stream; } I am using Bun.js instead of node. folderId is correct and the file is converted correctly from Blob to Readable
I wanted to connect Box and DataSpider (currently mitocoX), so I created a custom app from the development console, downloaded a JSON file, and tried to set it in DataSpider. However, I get an error and can’t connect. If you are an expert, please tell me if I should use a file other than a JSON file, and if so, where can I download a file other than a JSON file? I’m a newcomer, so there are a lot of things I don’t understand, but , thank you.
Hello, I am trying to access my Box app with Python code, that is using JWT to authenticate. Here is my code: from boxsdk import JWTAuth from boxsdk import Client from cryptography.hazmat.primitives.serialization import load_pem_private_key import json import base64 private_key_fpath = "/path/to/PrivatKey.pem" #Settings below generated by the Box Developer Console settings_fpath = "/path/to/1234__config.json" with open(private_key_fpath, "rb") as key_file: priv_rsakey = load_pem_private_key(key_file.read(), password=None) with open(settings_fpath, "r") as f: settings = json.loads(f.read()) settings['boxAppSettings']['appAuth']["privateKey"] = priv_rsakey auth = JWTAuth.from_settings_dictionary( settings ) access_token = auth.authenticate_instance() I get the following error BoxOAuthException: Message: "kid" invalid, unable to lookup correct key Status: 400 URL: https://api.box.com/oauth2/token Method: POST Headers: {'Date': 'Mon, 22 Apr 2024 20:27:23 GMT', 'Content-Type':
Hello Box Community, I am currently using Box Drive and monitoring file events with its Webhooks. I’m curious to know if it’s possible to retrieve the version history of files using Box Drive Webhooks. Specifically, I’d like to retrieve the version history related to changes made to a file, and I’m particularly interested in detecting if a file version has been reverted. If anyone in the Box community knows how to retrieve file version history using Box Drive Webhooks, I would greatly appreciate any insights you can provide. Thank you very much.
Hello, I’m fairly new to box and want to download a publicly available repo which is fairly large in size (>1 TB). How can I parse through the whole repo and download all the files? Right now, the only way to do this is by manually download each file, and the repo has >7,000 files. This is quite frustrating and impractical. Are there any obvious solutions to this that I might have missed? Thanks
Hello Getting exception “Request timed out” since Friday 4/12 through today on downloads using Box C# client var stream = await client.FilesManager.DownloadAsync(BoxID); On Saturday could not download any files Now it seems after program start, 1 or 2 downloads in a row work fine and then it hits a wall, restarting program over and over is the short term fix. Integration has been in place since 2020 Program has not changed lately Can access Box.com UI fine and download files too. Thank You!
Hello, I am trying to build a Blazor web app that uses Box’s API, and I’m struggling to implement OAuth2 authentication. I followed the instructions/documentation listed here: https://developer.box.com/guides/authentication/oauth2/with-sdk/ , but I’m having issues with obtaining the authorization code once I’m redirected to my app. Below is the code I have so far; it works as expected until I reach that final step. Any help will be greatly appreciated. -Code- private async Task OAuth2() { string authorizationUrl = "https://account.box.com/api/oauth2/authorize?client_id=" + clientID + "&response_type=code"; // Configure SDK var config = new BoxConfig(clientID, clientSecret, new Uri(redirectUrl)); var sdk = new BoxClient(config); //Redirect user RedirectToAuthUrl(authorizationUrl); // Exchange code - TODO: Get auth code to exchange for access token; check after redirect. var session = await sdk.Auth.AuthenticateAsync("[CODE]"); var client = new BoxClient(config, session)
Hi! I have a client who wants me to back up ALL the files on an old Ubuntu 14.04.6 LTS system to box.com. It’s a headless server (no gui) and they need every single file. There’s about 850 GB across 1,948,569 files in there. The largest file is only 2.4 GB. There are a few directories with a large number of files in them. The biggest count is 457,703 files in a single directory. They say they have unlimited box.com space and do not want to setup storage with another provider. I’m not sure I can run the box cli on this version of linux, and from what I’ve read, it doesn’t seem like it would be appropriate for something this big. I feel like FTPS would be the right thing (for box), but I can’t login to it from my personal account. Any suggestions would be appreciated. Thanks!
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.