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 .
To your question, that depends on the authorization type of your app. Are you using OAuth, CCG or JWT?
Also help us understand where you want to use this? From the curl example it looks like you will be calling this from inside a script, and I was wondering if the Box CLI could be better suited.
Hi @rbarbosa
thanks for replying .I need to go through all the other types.
yes you are right, we were using inside the script.
and that time authentication was : username and password
that is stored in .netrc file in Unix.
code was like “curl -vsiS -n -T productx.zip https://dav.box.com/dav/folder2/folderx/productx.zip >>$response_log 2>&1”
Do you think we can do similar things with Box CLI as well.
And can we upload files using Box CLI too .What will be the url in this case ?
sorry for asking naive questions i am new to this.
In that case I think 2 options are available, any of them imply the need to create a Client Credential Grant (CCG) application.
Option 1: Using the Box CLI
If you can install the Box CLI in the environment from where you do the upload, then you can use it in the script as a normal command, and with the CCG authentication it takes care of getting the access token for you. In other words you should be able to use a one line command for the upload after all the configs are set.
Option 2: Using cURL
You can still use cURL, but you would need to get the access token first, and from there use it as a Bearer token for the upload command.
Since the access token will be valid for 60 minutes you probably want to revoke the token immediately after.
All in all this would be about 3 cURL command, to get the access token, to do the upload and then the revoke.
A final note that from a permissions perspective, the service user must be able to access the destination folder. So you’ll need to share that folder with the service account user associated with the application.
Hi @rbarbosa
yes it was great help.
although i will go through first option as well.But still can we get more info or examples or any video for the 2nd option you mentioned with cURL.
In this 2nd option scenario what will be the URL.
and how can we get access token and bearer do we have to install configuration for that .
as you can see there is no authorization tab. so how can i authorize for the app .and get the access token. is it because we are having “Personal Pro” account.
Please guide in this
That explains a lot, I should have started with that question.
It seems your are using a free account, and in free accounts you can’t access the administration console and authorize applications.
You need to have an application configured to use OAuth 2.0 authentication.
Although OAuth does require manual intervention for the first use, as long as your app is used at least once every 60 days, it is suitable for scripting and Box CLI.
At the same time my company manager would like to discuss this issue with your team
on this .so that you can suggest appropriately. we are wasting so much time daily posting these things
Please suggest how the communication can be done.
eagerly waiting for your reply.
I mentioned the free accounts, because they are popular with developers trying out the API, and they get stuck in the same use case you mentioned.
That does not seem to be the case.
Since I am not qualified to discuss anything commercial or contract related, please do reach out to your box account manager, if you have one, or box sales directly. They will be able understand your requirements and match your needs with the proper tier.
From my side all I can offer is a workaround and suggest you use OAuth or Box CLI, with the limitation I’ve mentioned.
Hopefully your company can still find value in using box.
HI @rbarbosaPreformatted text
On your suggestion we were in meetings and mails with sales team.(Sarah, Scott,Sloane).
And our only doubt was that :
" Please let us know whether Business Plan will support diff authentication methods (OAuth,Json web token ,CCG and App Auth Token ).We are more interested with Box CLI with CCG along with Pricing Details and after upgrading can we get help from support if needed "
And we had not recieved any answer from team. Could you provide the help on this.
Thanks
HI @rbarbosa we are also looking into finding multiple ways to upload/transfer files.
Could you please suggest is there any tutorial/document for uploading/transfer files from GCP Buckets to Box server