Ask questions relating to Box here
Recently active
I have a problem when calling the share link files API with error code 403 and I don’t know what to do? Here’s content bopy: { “shared_link”: { “access”: “open”, “password”: “mypassword”, “unshared_at”: “2024-12-12T10:53:43-08:00”, “permissions”: { “can_download”: true, “can_preview”: true } } }
I have a new Box account. I created a new Box app from the developer console to process files stored in Box using a Python script. But the app_user_auth.authenticate_user() step is failing with below error **BoxOAuthException**: Message: Please check the 'sub' claim. The 'sub' specified is invalid. Status: 400 URL: https://api.box.com/oauth2/token Method: POST My python code looks like below from boxsdk import JWTAuth, Client import json with open('./settings_config.json','r') as file: config_json = json.load(file) auth = JWTAuth.from_settings_dictionary(config_json) service_account_client = Client(auth) app_user = service_account_client.user(user_id='xxxx') app_user_auth = JWTAuth( client_id=config_json['boxAppSettings']['clientID'], client_secret=config_json['boxAppSettings']['clientSecret'], user=app_user, jwt_key_id=config_json['boxAppSettings']['appAuth']['publicKeyID'], rsa_private_key_data= config_json['boxAppSettings']['appAuth']['privateKey'],
Hi All, I created a free developer account and create an app. I was able to generate the key for jwt authentication. I have 2 question which is blocking me Am I service user, or I need to create one? If So how, the documentations gives no info if any specific licenses are required On downloading the pub key json, i see enterprise ID =0, is this expected? I am getting an error on running my code. {‘error’: ‘invalid_grant’, ‘error_description’: "Please check the ‘sub’ claim. The ‘sub’ specified is " ‘invalid.’} Please help.
Hi,Can the box authorization page be available in Japanese content for my API, and if so, what changes are required in the API call to achieve this?
Hi Team good day, could you help me please I am trying to read one file into my box Folder Company , but seem I am not able to reach it , it is telling me access denied var BoxSDK = require(‘box-node-sdk’); var sdkConfig = require(‘…/Bromont.json’); var sdk = BoxSDK.getPreconfiguredInstance(sdkConfig); var client = sdk.getAppAuthClient(‘enterprise’) var fs = require(‘fs’); client.users.get(client.CURRENT_USER_ID) .then(user => console.log(‘Hello’, user.name, ‘!’)) .catch(err => console.log(‘Got an error!’, err)); var client = sdk.getAppAuthClient(‘enterprise’); client.files.getReadStream(‘1339534847387’, null, function(error, stream) { const chunks = []; stream.on('data', function(chunk) { chunks.push(chunk); }); stream.on('end', () => { var result = Buffer.concat(chunks); var sal=result.toString('base64') fs.writeFile('newfile.txt', sal, function (err) { if (err) throw err; console.log('File is created successfully.'); }); }) });
Hello Box developer community, I hope you are all doing well. I have a problem when I’m creating a new application. Now I’m trying to use API to upload my file from local to BOX but I can’t find the Authorization Tab. The plan I’m using is basic personal plan. Could anyone tell me how can I authorize my aplication?
Is there an api or way to connect box.com to ssis packages ? I just want to take files from our sql server and move them to box.
I am trying to get contents of my files. Unfortunatly they are in bytes, as I don’t want to store then as files I try to convert them into string. Even tough I tried many encoding none works. I also tried text representation which solves my problem. But it is only applicable upto 500MB documents as per the BOX documentation. How can I get the contents from the files even if they are greater than 500 MB.
Has anyone found an easy way to remove/delete inactive Box users? I’ve found a user saying they did it successfully using a CSV of User ID numbers, however, I can’t find a way to pull a list that includes user ID numbers.
boxsdk.exception.BoxAPIException: Message: Access denied - insufficient permission Status: 403 Code: access_denied_insufficient_permissions Request ID: 4j7c94hizkxe10i7 This is the response I get when I call through my application. But when the same call is made through postman I do get the response. Is the problem with the oauth or with my authentication code. I followed all the documentation lines for the Oauth2.0 in python sdk
Hi, We saw there is an event for deleted user - “event_type”: “DELETE_USER”, Is there another event for transferring all data from one user to another once deleted? Thanks
Is there API endpoint to count the number of files under a folder? We can get the counts by iteratively getting the counts under subfolder. This is resource intensive and does not seem to be a good way to get the counts especially because there is a request rate limit imposed.
Using .Net Library. var result = _boxClient.FilesManager…GetInfomationAsync(fileId, “file_version”) returns file_version (Id and Version number) But I need to get file version created_by and created_at. I tried this. var result = _boxClient.FilesManager…GetInfomationAsync(fileId, “file_version”, “created_at”, “created_by”) it includes created_at and created_by for the original file; but not for the file version. So I tried this: var result = _boxClient.FilesManager…GetInfomationAsync(fileId, “file_version”, “file_version.created_at”, “file_version.created_by”) and still does not work. Any help?
Hi, let’s say that I have a folder id as string. I can get folder object from folder id as: folder = self._client.folder(folder_id=folder_id).get() Now I would like to iterate over folder items that can be files or (sub)folders. for item in folder.get_items(): if item.type == 'folder': sub_folder_path = folder_path + '/' + folder.name For last line mypy reports: 64: error: “Folder” has no attribute “name” [attr-defined] Looks like folder (the same is for file as well) has .name property, but it is injected somehow on the fly. I don’t like putting #noqa nor doing hacks. Is there anything I can do to pass mypy check with this line? Regards, Zoran
Hi very new to CLI and Box. Trying to follow the “Use Box CLI with OAuth 2.0” guide and got this error when trying to define my environment using the command “box login -n <environment_name>”. I have checked the config file in the listed path and the config file is empty (not sure if it’s supposed to have content). I successfully used the “box login -n <environment_name>” command the other day when trying to follow the guide however it does not work today. Searching online brought me to this forum post: boxcli error "Could not read environments config file" – Box Support however I am so new I don’t know how to download a new config file from the provided link to the developer console. For now I will try to download new config file but does anyone have any idea why my config file would stop working in this manner? Thank you.
Hi! Am looking for a copy of the Box developer agreement to use the APIs - can’t find it anywhere. Thanks!
I wanted to ask your support in regards to uploading PDF’s via a server-side login (without human intervention). We are uploading to third-party boxes, which our account has been given access to (not our own Boxes). Error: We are receiving the below error message when uploading the PDF’s via API: boxsdk.exception.BoxOAuthException: Message: Grant credentials are invalid The login to Box is valid. The error pops up when uploading to one of the folders. For example trying to upload the latest ‘AU_BEL’ logs the following: Client Auth success: <boxsdk.client.client.Client object at 0x7fd2ee018310> Client User Auth success: <boxsdk.client.client.Client object at 0x7fd2ebfd14d0> Switched to folder for AU_BEL at 86734036620 Attempting to upload au_bel_20230821_2310.pdf to folder “86734036620” “POST https://api.box.com/oauth2/token” 400 77 {‘Date’: ‘Tue, 15 Aug 2023 10:18:41 GMT’, ‘Content-Type’: ‘application/json’, ‘Transfer-Encoding’: ‘chunked’, ‘Strict-Transport-Security’: ‘max-
Hi, We have observed that the Box API is not returning the files consistently in multiple runs, however, this issue is occurring rarely. Sometimes it fetches less files than what is present in the Box without making any changes anywhere. We are using the following Box SDK. <dependency> <groupId>com.box</groupId> <artifactId>box-java-sdk</artifactId> <version>2.58.0</version> </dependency> Sample code: BoxFolder folders = new BoxFolder(api, userRootFolderId); folders.forEach(item-> { if (itemInfo instanceof BoxFile.Info) { BoxFile.Info fileInfo = (BoxFile.Info) itemInfo; log.info("Fetched BoxFile {} with id {}.", fileInfo.getName(), fileInfo.getID()); } else if (itemInfo instanceof BoxWebLink.Info) { if (boxConfiguration.getCrawlWebLinks()) { log.info("Fetched Weblink {} with id {}.", item.getName(), item.getID()); } else if (itemInfo ins
I would like to obtain Access_Token through ‘Client Credentials Grant’. I created a New App through the My Apps menu. Administrator approval was obtained through the Authorization tab. When I request authentication as follows, an error message appears. https://api.box.com/oauth2/token grant_type: client_credentials client_id: xd~~ client_secret: Tm~~ box_subject_type: user box_subject_id: 28~~ response) { “error”: “invalid_grant”, “error_description”: “Grant credentials are invalid” } I requested the API through ‘Postman’. Help me please~ Thanks.
Hello - Using the Box List Recents API, I would like to exclude any events where the root-level parent folder is private (has_collaborations=false). It looks like I can pass has_collaborations as a field, but this only tells me about the item itself - I need to know if the item’s root level parent is also private. To get the parent, I can use path_collection, but when passing path_collection.entries.has_collaborations as a field to https://api.box.com/2.0/recent_items, nothing is returned. Is there another way to exclude recent events where the parent event is private? Thanks,
I created the access_token through Enterprise ID. The authentication method used was Client Credentials Grant. I obtained the access_token. I called the ‘List items in folder’ API using this access_token. I entered 0 for ‘folder_id’. However, as a result, no error message appeared and ‘total_count’ was output as 0. Clearly this folder exists. So I made the same call to the ‘List items in folder’ API using the ‘Developer Token’. The folder was output normally. Why can’t I get a list of folders when I create an access_token with ‘enterprise ID’? reference. If I create an access_token using OAuth 2.0, I can get the list of folders normally. Thanks.
Hi, we are trying to setup box cli from redhat based operating system but it has no ui, when we try to login from cli we supposed to get pop up page for confirmation, how we should handle it in no ui linux?
Hi Box Support Team, I would like to request to delete two custom Apps from my account. Client Ids of Apps are jpb0nvf4uv9a81o4k91vvozhucl4d56d (CAPS JWT App) jhhpiwuqh8jfm81dv8j6m3nfhdfu89uj (LookoutBlue-cloudapi)
Hi, When using the following command line: box folders:upload --parent-folder=xxxxxx [folder_to_upload] I am getting error messages “Could not upload file” not related to the size of the file. Sometimes these are .txt extensions but it can happen as well with other extensions such as .log, .json, these are usually small files of a few k. Is it possible to know why the files cannot be uploaded and is there a option to skip this error and continue the upload of the folder? the annoying bit is that the data transfer stops after this error. Thanks, Sol
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.