Skip to main content

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

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 !


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


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


Thanks rbarbosa - those python links will be very handy


Reply