-
Recently active
We use the Content Preview UI element to display a variety of files that are different dimensions. Some are long portrait, some are narrow landscaped. Is there a way to have the height property of the Content Preview automatically adjust or be in better proportion to the content. I have considered inserting metadata into the file at the time of file generation with the dimensions so I could calculate an appropriate dimension but to do that it looks like I would need to pass the file from box to another service.
I’ve encountered an issue with conflicting styles between the modal and btn elements in our site’s Bootstrap framework and the styles in https://cdn01.boxcdn.net/platform/elements/19.0.0/en-US/explorer.css. There might be additional conflicting styles that I haven’t identified yet. Any suggestions on how to resolve this? Currently, the only solution I can think of is to create a customised version of explorer.css. It would have been beneficial if the Box styles were prefixed to mitigate conflicts. Any insights would be appreciated. Thanks.
Hi there, I’m trying to download files created by someone within the same organization with Python SDK, but I get [403] access_denied_insufficient_permissions I can get file’s information (file id and name) with client.file(file_id).get(), but I get the above error when I try client.file(file_id).content(). Here’s my app’s status Authentication with Client Credentials Grant (already authorized) Both reading/writing files are allowed The service account has the access to the folder as Editor. Could anybody give me advice on the cause of this error? Thank you.
I have created a webhook as part of an application in Box. The application has a service account. The service account has all scopes possible (just make sure I didn’t miss anything). The service account is a co-owner of the folder that the webhook monitors. However, when I use the code examples from here and here I am unable to see the webhook (I receive a 404). Is this a permissions issue or am I doing something wrong? I have tried impersonating as the owner of the folder but I get a 403 response. import boxsdk import json from boxsdk import JWTAuth from boxsdk import Client def build_client(): auth = JWTAuth.from_settings_file('box_settings.json') client = Client(auth) return client client = build_client() webhooks = client.get_webhooks()
While creating application,clicked the “Generate Public/Private Keypair” & get the JSON file. From the JSON file,we have copied the content from “privateKey” & create new file (Config.PEM) and updated the “privateKey” values. the run the below code, getting an error. from boxsdk import JWTAuth from boxsdk import Client auth = JWTAuth( client_id=‘xxxxxx’, client_secret=‘xxxxxxxx’, enterprise_id=‘0’, jwt_key_id=‘xxxxxx’, rsa_private_key_file_sys_path=‘C:\Box\config.PEM’, rsa_private_key_passphrase=‘xxxxxxxxxxx’, ) access_token = auth.authenticate_instance() client = Client(auth) Issue : Could not deserialize key data. The data may be in an incorrect format, it may be encrypted with an unsupported algorithm, or it may be an unsupported key type C:\Program Files (x86)\Python\Python310>python.exe “C:\Users\arulap\OneDrive - Symphony Summit\Working\Official\Dev\Box\summitorchestration@gmail.com\JWTAuth_Test.py” Traceback (most recent call last): File “C:\Users\arulap\OneDrive - Sy
Hi, Is it possible to Downscope the Box token with java sdk for one folder only if that user is collaborator on multiple folders? e.g. root folder → folder 1 → folder x | | → folder y → more child folders and files | | → folder z → more child folders and files | → folder 2 → folder a | → folder b → more child folders and files (in case format messed up. folder x,y and z are the child folder of folder 1. folder a and b is child folder of folder 2. Folder 1 and 2 is child folders of root folder.) If user “ABC” is collaborated on “folder y”, “folder z” and “folder b”, can we downscope token to show only “folder y”, and “folder z” and not “folder b” on the box ui element with the existing role? Say user “ABC” has “editor” role on “folder y”, and “folder z”. Thanks.
Hi, we are using java1.8 version and trying to get the Token using Java SDK , but we got the below exception. developer.box.com Install Java SDK - Box Developer Documentation Explore the Box APIs and SDKs to use for app development, API documentation, developer support resources, and access the Box Developer Console above blog suggeste all the jar’s added. Sample Code: Path configPath = Paths.get(“config.json”); try (BufferedReader reader = Files.newBufferedReader(configPath, Charset.forName(“UTF-8”))) { BoxConfig boxConfig = BoxConfig.readFrom(reader); BoxDeveloperEditionAPIConnection client = BoxDeveloperEditionAPIConnection.getAppEnterpriseConnection(boxConfig); //Not able to get this token System.out.println(client.getAccessToken()); }catch(Exception e){ System.out.println(“Error =”+e.getMessage()); } This below exception, we are getting recently. Exception in thread “main” com.box.sdk.BoxAPIException: Error parsing PKC
I have an intermittent problem where the Python Box SDK is raising the following exception when generating a down scoped token. The code works most of the time but occasionally will stop working for a few minutes. Do the JWT tokens need to be expired or released? The code is being run from an AWS Lambda and the downscoped token only needs to be used once. Is there API rate limit. I don’t think I’m near it usage would be less then 30 an hour but maybe multiple in quick succession. Our Box Account is Business Plus. boxsdk.exception.BoxAPIException: Message: The subject_token provided is invalid The code that is generating the error is in the used to create a downscoped token that can be used by a Box Preview embed: config = JWTAuth.from_settings_file('cert/abcd_1234_config.json') client = Client(config) target_file = client.file(file_id=file_id) token_info = client.downscope_token(['item_preview', 'annotation_view_all', 'annotation_edit'], target_file) Full Error Trace Traceback (most
Hi, I’d like to make a request to have the dll in Nuget package signed by Box. The package itself is signed, but Box.V2.dll. Microsoft is introducing Smart App Control and having dlls signed gets more important.
Dear Forum, When running BoxAPI through an internal proxy, I am having trouble because [EE certificate key too weak] SSLError has occurred. Internal proxy information is set in Python-BoxSDK, Skipping certificate validation will prevent SSLError from occurring. Please let me know the cause of the above problem and how to resolve it. My personal opinion is that the security strength of the certificate sent from the internal proxy is too weak. 【SSL Error】 requests.exceptions.SSLError: HTTPSConnectionPool(host=‘api.box.com’, port=443): Max retries exceeded with url: /oauth2/token (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: EE certificate key too weak (_ssl.c:997)’)))
Hi, I’m a little stuck on this. We use box for our storage for clients (organisations) and with each client, we open a new folder. The functionality I’m looking for is for an internal admin webapp. When a user logs in to the admin app, I want to retrieve a service account token so then when they create an organisation, it triggers a new folder created in the enterprise account. All the client_ids etc are in the .env and in the dev console, the custom app is fine. Here is a copy of my server.js: const BoxSDK = require('box-node-sdk'); // Box configuration app.get('/api/box-access-token', cors(corsOptions), async (req, res) => { const sdkConfig = { boxAppSettings: { clientID: process.env.BOX_CLIENT_ID, clientSecret: process.env.BOX_CLIENT_SECRET, }, enterpriseID: process.env.ENTERPRISE_ID, } const sdk = BoxSDK.getPreconfiguredInstance(sdkConfig) const client = sdk.getAnonymousClient(); // Extract the necessary information con
Hello , do we have a sample to get the refresh token in Python Gen SDK ? and those any rule to using refresh token ? like i am a Dev account can we using the refresh token ? and where can get the authorization code ? if Enterprise account do we need refresh token ? Many thanks !
Hi @rbarbosa we have created app with CCG and were trying to get access token with client credentials (client id,secret ,box service id ,box sevice type)in POSTMAN. WE got following error : "error":“unauthorized_client”,“error_description”:“The grant type is unauthorized for this client_id”} " And also “Authrozition” tab is also not active (no clickable).it is my doubt that we logging to site with diff user then Admin user.If that is the case , how can we know the admin user name
We’ve integrated Box with Apache NiFi, there is a processor which puts files to Box folders. In case the folder does not exist, it is created by NiFi. Usually there are several nodes in NiFi cluster so two or more NiFi instances try to create the same folder in Box parallel. Normally Box returns 409 (conflict) in case the folder is being created while another request arrives for the creation of the same folder, the NiFi processor handles this case. Although we experienced intermittent failures during our system tests when subfolders are created in Box (e.g. folder1/folder2/folder3) . Sometimes the folder is created twice with the same name, e.g. we have two “folder1” which is considered illegal since folder names are unique in Box. It seems Box does not throw an error in some cases and creates a folder with an existing name. Is it a known issue maybe? We use box-java-sdk, 4.4.0.
I’m trying to download the files of the publicly shared KUL fall simulation dataset (Box), as I access the server I want to run my AI training on via ssh and of course don’t have a browser there. Also I’d like to avoid copying 20GB of videos via ssh or something. My app successfully authenticates and obtains the folder ID from the shared link using client.get_shared_item(shared_link), it returns “44028703597” as the folder ID. Then I call folder_items = client.folder(folder_id).get_items(), no problems here. Now when I try to iterate over that, I get an error message that the folder with the ID “d_44028703597” can’t be found, which is weird because in the same message I can see that the SDK calls GET https://api.box.com/2.0/folders/44028703597/items?offset=0, without the d_ prefix. Any idea what I’m doing wrong? My app has read permission, I can’t see anything else it might need to read public files.
Hi, I’m new using Box.com’s Java SDK. The application I’m working is trying to use Java to connect to Box.com in order to download a file. The application is a Spring Boot project, version 2.5.9, compiled using Java 8. The code below “fails” in method: BoxDeveloperEditionAPIConnection.getAppEnterpriseConnection(boxConfig, tokenCache). The method does not throw an error and never comes back from the call. The thread this process is in Stops. try { Reader reader = new FileReader("D:/Box/xxxxxxx_config.json"); BoxConfig boxConfig = BoxConfig.readFrom(reader); IAccessTokenCache tokenCache = new InMemoryLRUAccessTokenCache(100); BoxDeveloperEditionAPIConnection api = BoxDeveloperEditionAPIConnection.getAppEnterpriseConnection(boxConfig, tokenCache); BoxFile file = new BoxFile(api, "1081XXXXXXXXX"); BoxFile.Info info = file.getInfo(); FileOutputStream stream = new FileOutputStream(info.getName()); file.download(stream); tr
error: package org.apache.poi.ss.usermodel does not exist import org.apache.poi.ss.usermodel.*; i meet above error when i coding , i has add the poi dependencies in build.gradle as below implementation “org.apache.poi:poi:3.17” i am using IntelliJ IDEA , anyone can help to this ? thanks!
{‘error’: ‘invalid_grant’, ‘error_description’: ‘Grant credentials are invalid’} getting error while using ccgAuth() with cient id, client secret and user. please help…
Hello everyone!, I’m working on a website and I’m implementing box embed on iframes to show a preview of my files and I’be stuck because only on Chrome the preview of the iframe isn’t working, The iframe shows the message “We’re sorry, the preview hasn’t load. Please refresh the page.” I’m using Box API to connect and validate my session and bring the shared urls of my files. In firefox and other explorers this works without problems. ¿Any help? Thanks!!
Hi folks, I often use the Box Postman Collection to interact directly with the Box API, so I can troubleshoot my code, or just to see what an actual response looks like. The existing collection only automates the access token refresh for OAuth 2.0, and it is fairly complex to change it to support CCG or JWT, even though a lot of times I wish I had that possibility, so I could work directly with the service accounts. Having said that I wanted to gauge the community interest in supporting access token refresh for CCG and JWT, or anything in between: Developer Token (non refreshable) OAuth 2.0 Client Credential Grant (CCG) JSON Web Token (JWT) Other (leave comment below) All of the above 0 voters Let us know! Cheers
Hello everyone, I’m facing an issue with the speed of the responses I’m receiving from the API. I’m making 100 parallel calls from one user and repeating this process 10 times, resulting in less than 1000 calls per minute. Here’s the code snippet that I’m using: _boxClientCredentialsGrant = new BoxCCGAuth(boxConfig); _userclient = _boxClientCredentialsGrant.UserClient(_testUserId); // This part in paralel 100 times // iterate 10 times var result = await _userclient.UsersManager.GetCurrentUserInformationAsync(); The blue line is the performance in average pro call in this scenario I’m wondering if there are additional optimizations that I can implement to receive faster responses to these API calls and process them more quickly. Has anyone had experience with performance optimization? I’m questioning whether the current performance is acceptable or if there are further optimizations I can make on my end. For example, should I consider using an HTTP client instead of the SDK or any o
Hi Team, We are constantly getting below error when our automated jenkins jobs trying to upload files on box folder: access_token = response.json()[‘access_token’] KeyError: ‘access_token’ The same jobs are working fine on staging server with same configurations means files are being uploaded to box folders using the same app config on our staging server. The issue we are facing is in production jenkins jobs, it was working fine till 24th dec but now continue to fails generating access token. We are currently using JWT without SDK approach. Looking forward for some help. Thanks, Shailendra J
Hello world, I’m writing some code trying to integrate Box Java SDK into my own Android Java code. The URL to invoke Box OAuth2 is built using code like below BoxAPIConnection.getAuthorizationURL(clientId, URI.create("oauth://box.oauth2/redirect"), state, scopes) Whereas state is a random UUID string and scopes is just root_readonly. Using some non-standard protocol name here since I expect app deeplinks will capture the above redirect, then I will be processing the redirect callback in my code to get the access token. However, upon invoking the above code, my Android code isn’t capturing the deeplink URL at all. Traced down a bit revealed the URL returned by box.com server is being https://app.box.com/login/mfa?redirectUrl=%2Fapi%2Foauth2%2Fauthorize%3Fclient_id%3D<REDACTED>%26response_type%3Dcode%26redirect_uri%3Doauth%253A%252F%252Fbox.oauth2%252Fredirect%26state%3D<REDACTED>%26scope%3Droot_readonly# That made box came to nowhere but a missing page. I thought I should
Hello, I am experiencing an issue with the NodeSDK, whenever I apply any data shape, to boxClient.folders.addMetadata() it throws a 400 with “message”: “Request contains invalid parameters.”, If I apply a empty object {}, it works without issue. (So I know that i am able to connect, and have permissions ect) The shape of the metadata template is: The relevant code: const metadataValues = { ENTITY_ID: “1234”, is_Active: “1”, is_Found: “1”, }; let response_metadata_applied = await this.boxClient.folders.addMetadata(folder_id, “enterprise_534608”, “ciptemplate”, metadataValues); It throws a 400, with that error. If I apply let response_metadata_applied = await this.boxClient.folders.addMetadata(folder_id, “enterprise_534608”, “ciptemplate”, {}); It works 100%, but the values are of course empty. I have tried all methods of controlling the body: when I look at the error response { “statusCode”: 400, “response”: { “statusCode”: 400, “body”: { “message”: “Request contains invalid parameters
Hoping someone can help and point me in the right direction Using the .Net SDK using the Access and Refresh Token authentication and when the token expires (via the HttpRequestHandler 401 status code) and the SDK calls the RetryExpiredTokenRequest I get a Bad Request error. If I refresh the tokens outside of the SDK, the code authenticates correctly with no errors. What am I doing wrong? Any help would be greatly 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.