Skip to main content
Solved

Can I curl Box to get a list of my files changed in the last hour


  • New Participant
  • 2 replies

Hi, I am completely new to Box so please let me know if I am in the wrong place.

I would like to be able to run a Curl command to pull a list of files modified in the last hour from my All Files view and it should look down through child folders.

I found this: https://developer.box.com/reference/get-folders-id-items/ which is nearly there but it needs a Token.

And when I look for how to create a token I see https://developer.box.com/guides/authentication/tokens/access-tokens/ but the example there dont show the -d values.

I suspect I am on the wrong trail.

Can What is the easiest way to create a token that I can use?

Thanks

Best answer by rbarbosa Box

Hi @Keith


You could use a developer token, although these only last for 60 minutes before they need to be refreshed manually.


If you use Postman, we do have a collection you can fork, a convenient token refresh script that automatically refreshes the expired access tokens, and an automatic setup process.


Check out our Postman quick start.



You might find these articles interesting for your use case:






Cheers

View original
Did this topic help you find an answer to your question?

4 replies

CodeBoxSeb
  • Participating Frequently
  • 58 replies
  • August 29, 2023

Welcome to the forum Keith ! 😀


Did you create an app? First, you need to create a Box app to get a token.

When you create your app, you’ll have to select a Auth method. I would recommend you to check this page : https://developer.box.com/guides/authentication/select/


Then, once your app is created, you can create a token.


Finally, the commands to list items located in a folder are listed here : https://developer.box.com/reference/get-folders-id-items/


If you need to display the items located on your root folder (All files page), the Folder ID will be : 0


I hope it helps !


rbarbosa Box
  • Developer Advocate
  • 553 replies
  • Answer
  • August 29, 2023

Hi @Keith


You could use a developer token, although these only last for 60 minutes before they need to be refreshed manually.


If you use Postman, we do have a collection you can fork, a convenient token refresh script that automatically refreshes the expired access tokens, and an automatic setup process.


Check out our Postman quick start.



You might find these articles interesting for your use case:






Cheers


  • Author
  • New Participant
  • 2 replies
  • August 29, 2023

Thanks Seb - that link to authentication was very handy. I did get an app created and curls working so good progress.


  • Author
  • New Participant
  • 2 replies
  • August 29, 2023

Thanks rbarbosa - those python links will be very handy


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings