All things API and SDK related
Recently active
I have been struggling to get a thumbnail representation through the .net sdk. I am able to get the url for the download but everytime I try to download it through an httpclient request to return a stream, the stream results and memorystream converted to base64 are unusable. I am unsure if my approach is not correct or if there is an issue with the sdk. My code is as follows: public async Task<string> GetThumbnailImageById(string Id) { BoxClient adminClient = _session.AdminClient(await token.FetchTokenAsync()); var requestParams = new BoxRepresentationRequest() { FileId = Id, XRepHints = "[png?dimensions=1024x1024]" }; BoxRepresentationCollection<BoxRepresentation> representations = await adminClient.FilesManager .GetRepresentationsAsync(requestParams); var url = representations.Entries.FirstOrDefault().Info.Url.ToString();
I am using Box-Node-SDK to fetch details of a file in my drive. As you can see in the below screenshot, I created the file and modified it multiple times. We can clearly see that I am the owner of the file., in the file details. But, when I fetch the File-Info using Node-Box-SDK. The “Permissions” object in the response shows “can_upload” as “false”. I have created a Custom-Application to use Auth2.0. Added a Web-Integration, I used the auth-code Received from web-integration to Initialise BoxClient and Fetch FileDetails. Am I missing something obvious here? Why is “can_upload” show “false”, When I have access to the file, and uploaded a new version multiple times? Thanks, Sarin
The documentation at https://developer.box.com/guides/embed/box-embed/ briefly mentions that postMessage() is used to retrieve status, but I can’t seem to make it work. I’ve setup an event listener for the message event, but it does not fire. I’ve also tried calling postMessage on the iframes contentWindow property, but to no effect.
Hi Team, I got stuck when I tried to run the script from the repository Mini Box MediaInfo Video Metadata Uploader on GitHub. I followed the README instructions step by step, and I also check the Video on YouTube. When I ran the following command: python3 src/main.py -c I got the following error: ImportError: cannot import name ‘appengine’ from ‘urllib3.contrib’ Can anyone help me understand why I got this? Thanks.
i am using the boxnet integration with moodle as found on GitHub - moodlehq/moodle-repository_boxnet: Boxnet repository that was removed from standard package in Moodle 4.0 and finding some environments failing on the download (while others continue working). i am wondering if there are any tools to let me see what is happening from the box end of things? thx for any help.
Hi team! We submitted the app for approval around 2 weeks back but haven’t received any reply till now about our approval status. App details: Name: Cobalt Email: integrations@gocobalt.io User ID: 30678966382 Can you please expedite this as it’s an urgent requirement? Looking forward to a positive response.
We are actively builidng a Box Integration. Developed a custom-application to use Authentication as OAuth2.0. We have added multiple web-integrations and everything works as expected. When Any action is triggered from Box-Cloud using a Web-Integration – We use the authCode to generate the access-token with NodeSdk. – We perform the required task and Workflow is Completed without any issues. We are storing {access_token, refresh_token, ttl} in our backend database… The Problem is when we Try to refresh the Token: The Refresh Token is used for the first time. The Refresh Token is not expired (I tested within few minutes, after getting the refresh-token). I tried using the Authentication flo: Contructing AuthenticationUrl, Allow Access from BOX, Exchange Code for Token. etc. It also failed when I try to Refresh the Token. I tried using CURL, POSTMAN and NODE-SDK. Everything is throwing the same error related to "Invalid-grant" “invalid_grant”, “Invalid grant_type parameter”, etc T
Copy pasting this from another question that was never answered: When I attempt to perform a preflight check with a file with the same name in the same folder and run into a naming collision, I have code that accounts for the conflict error Box API Exception with code: “item_name_in_use”. I expect the JSON object to have an array of conflicts inside context_info as per the documentation https://developer.box.com/reference/resources/conflict-error/ However, sometimes conflicts is an object instead of an array, breaking my deserialization process. Example: When calling boxFolder.canUpload(filename, fileSize), I receive this error: { "type": "error", "status": 409, "code": "item_name_in_use", "context_info": { "conflicts": { "type": "file", "id": "1545199568548", "file_version": { "type": "file_version", "id": "1697444235748", "sha1": "da39a3ee5e6b4b0d3255bfef95601890afd80709" }, "sequence_id": "0", "etag": "0",
Hi, What is the use of using the SDK when we already have API. We can directly use those API. I am trying to do chunk file upload. For that it initially creates a session and then uploads parts of a file (https://upload.box.com/api/2.0/files/upload_sessions/:upload_session_id) this the API to upload parts of a file. I checked in SDK how they uploading the parts of a file, in that they have handled all the file splitting and every required. But when I tried the https://upload.box.com/api/2.0/files/upload_sessions/:upload_session_id API in postman, I am not able to upload file. My question if SDK are handling these splitting functionalities, Does API also handle all the scenarios? What is the benefit of using SDK if we already have API?
Hello, We are trying to bulk create Box folder/subfolders for existing Person Accounts in Salesforce. We have different Record Types available in Salesforce and our Box folder structure will be slightly different for each of those Record Types. Is there any way we can bulk create these folders in Box without consuming too many API callouts? Thanks Deepak
After a lot of simultaneous user delete and group_membership delete operations, some group_memberships are stuck. In admin console, it shows that there are users in the group, but not showing them inside, also users are already deleted. If checking via API, they are shown in group/GROUP_ID/memberships endpoint, but attempting to delete them via DELETE on /group_memberships endpoint causes this error: { “type”: “error”, “status”: 404, “code”: “not_found”, “context_info”: { “errors”: [ { “reason”: “invalid_parameter”, “name”: “group_tag_user”, “message”: “Invalid value ‘group_tag_user_36356814675’. ‘group_tag_user’ with value ‘group_tag_user_36356814675’ not found” } ] }, “help_url”: “http://developers.box.com/docs/#errors”, “message”: “Not Found”, “request_id”: “fdm4k5hpziqx9of5” }
If I have my own logger+handler and not using BasicConfig… so like this… chandler = logging.StreamHandler() chandler.setFormatter(logging.Formatter('[%(levelname)s] %(asctime)s %(message)s')) logger = logging.getLogger("my_custom_logs") logger.setLevel(logging.DEBUG) logger.addHandler(chandler) I’m getting weirdness with client.uploads.upload_file_version where it hangs for 10mins, then the created version is blank. It’s not throwing any Exceptions and nothing lands in my logger What’s the correct way to get debug logs from the BoxClient?
Hi ! I’m using java1.8 version and trying to get the Token using Java SDK , but we got the below exception. Exception in thread “main” com.box.sdk.BoxAPIException: Error parsing PKCS private key for Box Developer Edition. at com.box.sdk.BoxDeveloperEditionAPIConnection.decryptPrivateKey(BoxDeveloperEditionAPIConnection.java:568)* at com.box.sdk.BoxDeveloperEditionAPIConnection.constructJWTAssertion(BoxDeveloperEditionAPIConnection.java:503)* at com.box.sdk.BoxDeveloperEditionAPIConnection.authenticate(BoxDeveloperEditionAPIConnection.java:327)* at com.box.sdk.BoxDeveloperEditionAPIConnection.getAppEnterpriseConnection(BoxDeveloperEditionAPIConnection.java:182)* at com.box.sdk.BoxDeveloperEditionAPIConnection.getAppEnterpriseConnection(BoxDeveloperEditionAPIConnection.java:216)* at com.arondor.flower.tools.box.util.BoxAPI.setAPI(BoxAPI.java:54)* at com.arondor.flower.tools.box.util.BoxAPI.getAPI(BoxAPI.java:33)* at com.arondor.flower.tools.box.service.ServiceFolder.createBaseFolder(Ser
Hi @rbarbosa, I am also trying to fetch files and folders in content explorer, using metadata query in node/react. I am facing 2 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. I have 3 folders with different values for sponsorCode metadata(Folder 1- TESTF metadata, Folder 2- TESTR metadata, Folder 3- TESTM metadata. I am only able to fetch files/folders for TESTR metadata. Other searches are resulting in no data in response. I have waited for more than 48 hours after applying metadata. Can you pls help solve this?
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
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.