Introductions and general questions relating to Box
Recently active
Hello all, The developer community will be moving to a new platform soon! This move is being made to enable a better experience for community members, and will be the first step in moving the broader Box community into one platform. So if you’re an admin and a developer, or a partner and a developer, your community experiences will exist all in one space. We will be migrating all users and content as of 10am ET this morning (6 May 2024). We will also be creating an archive of all posts from the former Zendesk forum, so you have access to all the historical data and if you have an account here, it should map to your account there so you will still have access to any posts or replies you have created here. We will do our best to migrate things that take place here from now until the 15th, but it will be a manual process, so apologies in advance if we miss anything. The new site will also move to https://community.box.com, but this URL will redirect you automatically.
I am working on a Lambda function to be deployed on AWS. Application works fine locally. But fails when deployed on AWS. When I try to generate JWT token, I am getting error. " The SSL connection could not be established. Unable to read data from transport connection. Connection reset by peer" I am working with Windows SDK Box.V2 - 5.7.0 There are no out bound rules that’s blocking me and curl request seems to get me some response back. Any one face similar issue and have a suggestion I could try?
We are excited to announce that the Box AI API and Box AI for UI Elements are available in public beta to all Enterprise Plus customers. The Box AI API will allow customers to extend Box AI capabilities to power their 3rd party and custom apps. The Box AI API will support queries within single and multiple documents (limited to text representation up to 1MB and limited to 25 files), summarization, and text generation. In addition to the Box AI API public beta release, customers will be able to: Ask Box AI questions of their documents within the Content Preview UI Element Review Box AI API documentation, SDKs, sample apps, and other developer resources Explore the Box AI API through interactive experiences and demos within the Box AI Developer Zone We’re always looking for feedback on new features and functionality - so post below to let us know what you think! Thanks, Deeksha Malhotra
Hi, I need to download all the files in https://app.box.com/s/rf6p81j3o507e8c5saywtlc1p91f8po9 I cannot download it through the browser because the files are > 150 GB. Thus, I want to create a script that downloads the files one by one. To do so, I signed up for Box, and created a Custom App. On the ‘purpose’ drop-down menu, I selected ‘other’. Next, I selected ‘server authentication (with JWT)’. I then navigated to the configuration tab and added clicked ‘Genereate a Public/Private Keypair’, which downloaded a file named 0_XXXXXenv_config.json where the X’s are random digits/characters. I renamed this file to config.json and then tried to run: from boxsdk import JWTAuth, Client auth = JWTAuth.from_settings_file('config.json') client = Client(auth) auth.authenticate_instance() shared_folder = client.get_shared_item("https://app.box.com/s/rf6p81j3o507e8c5saywtlc1p91f8po9") for item in shared_folder.get_items(limit=1000): client.file(file_id=item.id).download_to(item.name) b
Hi, I am currently looking for fixing the issue when uploading a multipart request through a http request, showing the error as { “code”:“bad_request”, “help_url”:“http://developers.box.com/docs/#errors”, “status”:400, “message”:“API upload did not contain a file part”, “type”:“error” } and the input is ------BOUNDARY Content-Disposition: form-data; name=“attributes” { “name”: “Sample.png”, “parent”: { “id”: “0” }, “content_created_at”: “2012-12-12T10:53:43-08:00”, “content_modified_at”: “2012-12-12T10:53:43-08:00” } ------BOUNDARY Content-Disposition: form-data; name=“file”; filename=“Sample.png” Content-Type: image/png ------BOUNDARY-- I couldn’t use the SDK’s and the curl’s because I am using a low code platform and its very complicated there. I used a web socket to check out the request and the binary file was getting send.
Hi, I Got these ID in json format. We have to make connections only using these IDs. { “boxAppSettings”: { “clientID”: “”, “clientSecret”: “”, “appAuth”: { “publicKeyID”: “”, “privateKey”: “”, “passphrase”: “” } }, “enterpriseID”: “” } the environment will be like this. poc environment : xyz.box.com I got the above details for our box environment. I am trying to connect from postman to box account. But unable to make a connection, facing unauthorized error like this { "error": "unauthorized_client", "error_description": "The grant type is unauthorized for this client_id" } I have set up the environment in postman, the setup will contains the above credentials only and tried some APIs to get response but facing unauthorized error. Do we need access token or I need to get separate user level access to make the connection ? Can someone please help me to make connection to the box. Can someone provide the documentation for future reference.
Hello there, I am using Box api to create some automations and today one of my requests received this response: upstream connect error or disconnect/reset before headers. reset reason: overflow Because of this, the automation didn’t go through. I didn’t find any topic about this so I created this one. What actually happend to trigger this error and how can I prevent it to happen again?
Here is the code from boxsdk import OAuth2, Client CLIENT_ID = 'XXXXXXXXXXXXXXXXXXX' CLIENT_SECRET = 'XXXXXXXXXXXXXXXXXX' oauth2 = OAuth2( client_id=CLIENT_ID, client_secret=CLIENT_SECRET, ) access_token = oauth2.access_token client = Client(oauth2) folder_id = '1234' folder = client.folder(folder_id=folder_id).get() file_path = "C:\\Users\\sample.txt" file_name = 'sample.txt' with open(file_path, 'rb') as f: file_uploaded = folder.upload_stream(f, file_name) print(f'File {file_uploaded.name} uploaded successfully to {folder.name} folder.') Error boxsdk.exception.BoxOAuthException: Message: No "refresh_token" parameter found Status: 400 URL: https://api.box.com/oauth2/token Method: POST
I want to call [API:2.0/recent_items] by postman. but error 403 is populated. used token is ok. because I used the token to called [API: 2.0/files/id ] and successful response. when use same the token to call [API:2.0/recent_items] ,it is error 403. how to solve it ? thanks.
I looking for an option to create automatically file request URL at the creation of the folder, as every folder represent a job done by freelancers that need to share proof with me. The idea is to get register in my sistem → create a folder via API → create is File request link → Active trigger when something is uploaded via file request link. The API doc only says: Limitations Currently, the API only allows the creation of new file requests by copying an existing file request associated to another folder. Please check our guide to create a template folder with a template file request.
Hello, I have been attempting to do a request to : https://api.box.com/oauth2/token My dev setup, is almost identical to my prod setup with one exception. In prod i use a Public Key. I am rewriting a tool i made using the NodeSDK in Rust. The issue I have is, in the NodeSDK you can pass it a thing like this: { “boxAppSettings”: { “clientID”: “hvauxhjq98474895cej49uq2na1k4m3hca”, “clientSecret”: “********************************”, “appAuth”: { “publicKeyID”: “”, “privateKey”: “”, “passphrase”: “” } }, “enterpriseID”: “42069” } Then i just pass it to my sdk as a preConfigured instance. HOWEVER, I have my Rust based Wrapper working with my dev account, but when I go to move into prod, I must be missing something, as i cant find examples of how to do this using a direct http request: For example: GitHub GitHub - box/box-node-sdk: A Javascript interface for interacting with the... A Javascript interface for interacting with the Box API. You can find the
we trying to upload the documents from box application to our project from a specific folder. In this folder users may update the existing files and we need to upload those files and I wanted to extract those file. In the documentation I’ve observed this API but I am not understanding what values do I need to use in the variables from and value to set in the field mQuery.setFields(“metadata.enterprise_341532.test.customField”) Could you please tell me what values do I need to give in these fields. String from = "enterprise_341532.test"; String query = "testfield = :arg"; String ancestorFolderId = "0"; MetadataQuery.OrderBy primaryOrderBy = MetadataQuery.OrderBy.ascending("primarySortKey"); MetadataQuery.OrderBy secondaryOrderBy = MetadataQuery.OrderBy.ascending("secondarySortKey"); MetadataQuery mQuery = new MetadataQuery(from); mQuery.setQuery(query); mQuery.setAncestorFolderId(ancestorFolderId); mQuery.setOrderBy(primaryOrderBy, secondaryOrderBy); mQuery.addParameter("arg", "test
Code = function getNewAccessToken(clientId, clientSecret) { return new Promise((resolve, reject) => { const options = { method: ‘POST’, url: ‘https://api.box.com/oauth2/token’, headers: { ‘Content-Type’: ‘application/x-www-form-urlencoded’ }, form: { grant_type: ‘client_credentials’, client_id: clientId, client_secret: clientSecret, box_subject_type: ‘user’, box_subject_id: ‘8777888766’ } }; request(options, function (error, response, body) { if (error) { reject(error); } else { const parsedBody = JSON.parse(body); if (parsedBody.access_token) { console.log(parsedBody.access_token); resolve(parsedBody.access_token); } else { reject(parsedBody); } } }); }); } I am getting the Error } { error: ‘invalid_grant’, error_description: ‘Grant credentials are invalid’ } Please provide me a solution of it
Security.addProvider(new BouncyCastleProvider()); PEMParser pemParser = new PEMParser( new StringReader(config.boxAppSettings.appAuth.privateKey) ); Object keyPair = pemParser.readObject(); pemParser.close(); the keyPair return null?
Hi Team, Is there a way to query a specific user collaboration ID to a specific folder using Box CLI? Best Regards
I wrote a blazor .net app to upload a file to box through a jwt box app I created. I’m properly setting the uploaduri. I can run other commands but when it comes to uploading a file with UploadAsync, I get the errors: ‘The SSL connection could not be established, see inner exception.’ Inner: AuthenticationException: The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch Has anyone seen this before and if so how to fix? Our support guy said this is more of a local setup issue and washed his hands of it. Hoping the community has seen this.
Hi everyone I have written PowerShell script to upload different files to needed folders in Box API call return normal response and the files appear in box, but just txt files have content. PDF are empty and for other files just download button. After download the files are broken. Request body contains boundary and the content of file gotten using StremReader. For each file type I sent its own Content-Type selected by extension. $fileName = (Get-Item $filePath).Name # Determine the content type based on file extension $contentType = Get-ContentType $filePath $line = '{"name":"' + $fileName + '", "parent":{"id":"' + $parentId + '"}}' # Open a FileStream to read the file content $fileStream = [System.IO.File]::OpenRead($filePath) # Create a stream reader to read the file content $streamReader = [System.IO.StreamReader]::new($fileStream) $fileContent = $streamReader.ReadToEnd()
In the document example response it has the metadata developer.box.com Search for content - API Reference - 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 but when i search it did not return.
I have a server side application which needs to upload files to box I have it set up with Client Credentials Grant and using the OAuth 2.0 with Client Credentials Grant (Server Authentication) But when I try to make the curl request with Client ID kox474mes4cugrj929i4kh5enokukmlt I get the Grant credentials are invalid. Looking around, it seems to be related to a recent change where custom apps are not immediately approved. This is for a free account while we are trying to get it set up and working.
I am working on developing an app using the API, I upgraded my account to the starter pack because Box requires developers to pay atm. I can create an API agent and connect using the JSON provided but the account does not have visibility to the ‘root’ folder of the enterprise account, it seems it gets dropped off in its own place? I can put stuff there like new folders but I can’t find any of it in the admin console. I started as a free account, maybe the accounts are not linked properly? Maybe I’m doing something wrong?
Im sorry my English is not good. Can I change the permissions of the following co-administrators in the Box CLI? 【Users and groups】 ・Manage users ・Manage groups 【Files and folders】 ・View user content ・Editing User Content ・Logging in a user’s account 【Reports and Settings】 ・Viewing the company’s settings for the application ・Editing company settings in the app ・Running new reports and accessing existing reports etc. I checked the official Box documentation and the following sites, but I can’t find a way to do it github.com //github.com/box/boxcli/tree/main/docs
Hi Rui , We are having company account with Box site, where were using Webdev (using curl ) to upload files to Box site . “*/opt/bin/curl -vsiS -n -T product.zip https://dav.box.com/dav/Data%20Sharing*/” so from 5 years we have been uploading files to site.Now we came to know that webdev is being depricated .And it is no longer working. Could you please suggest how can we move forward with this. AFter going through developer documents i found the similar kind of things related to curl . curl -X POST https://api.box.com/2.0/files/content -*H ‘Authorization: Bearer DEVTOKEN’ * -H “Content-Type: multipart/form-data” -F attributes=‘{“name”:“Photo.jpg”, “parent”:{“id”:“121466666995”}}’ -F file=@Photo.jpg How can we get Authorization parameter for already created application . Thanks in advance
Hi Team, I am getting The API returned an error code [400] invalid_grant - Grant credentials are invalid error while connect to BOX . Authorization method : OAuth 2.0 (Server Authentication) with Client Credentials Authorization My account is a paid account
Hello, I’m working through creating my first application. I have my script working to create new users using the CLI. I am working on using the command for storage policies. When I run the command: box storage-policies:assignments:lookup $ManagedUserID I get “box : Unexpected API Response [404 Not Found | 04b98908e769f2e0] not_found - Authorization Failed” I’m sure this is due to some sort of permissions, but I’m not sure why. I created the application using Client Credentials Grant. I have given every permission except for “Generate user access tokens”. So far in my script I have not had to generate a token. To assign a storage policy do I have to use a token? Thank you.
Hello, currently I am using Box Web Interface to login and upload the files on Box. I would like to use Python to Authenticate and upload the files. I have gone through the documentation and I think I need a developer access for the same. I am using SSO to login into box. Is there a way to achieve this without BOX SDK or creating an app?
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.