It sounds like you're probably using access tokens from the API v2 Explorer. That's just meant for prototyping calls, and is currently using early access to a new feature where it only returns short-lived access tokens.
To get long-lived tokens, you should retrieve them for your own registered API app, instead of the API v2 Explorer. You can find information on how to do so in the OAuth Guide.
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?