I'm trying to make a simple powershell script to upload a file to a shared folder, then automatically generate a view only sharing link with a specified expiration time and a password.
I made a dropbox app, set the permissions, generated a token, used the token and the REST api endpoints to upload the file, and then created the sharing link with the right settings. All was well in the world.
Then only a few hours later the token expired. So I looked through the documentation for the API endpoints to find a way to programmatically get my own personal token, only to find nothing useful. Everything was either for another language, or assumed that I'm making a web app that can use webhooks or something. I looked elsewhere on the internet, and it appears that all powershell specific guides are from the era of permanent tokens.
Is there any relatively easy way to request a token using powershell so that I can upload my own file to my own dropbox folder automatically?
Thanks,