Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Good afternoon.
I am currently connecting to Dropbox via PowerShell using the Invoke-RestMethod command and using the "Generated Access Token". Currently the problem that I am presenting is that daily the "Generated access token" changes and I have to modify the PowerShell Script. Is there a way that I can use another parameter or token that doesn't change?
I was also checking the parameter "application key" and "App secret". But I haven't figured out how to use it with PowerShell's Invoke-RestMethod command.
I hope you can help me.
Cordially,
Jairo Baleta
@jbaleta wrote:... Is there a way that I can use another parameter or token that doesn't change?
...
Hi @jbaleta,
Yes and No. Yes - You can use refresh token - a non expiring token that you can use till revoke. Access token expires; it stay valid for ~4 hours. No - to call regular API access points you need access token, so you cannot "throw out" it completely. Using refresh token you can regenerate new access token whenever needed and the existing access token, if any, already expired. As a walkthrough you can take a look here for 'curl' example; I believe you can 'translate' it to whatever web query tool syntax.
Hope this gives direction.
@jbaleta Здравко is correct; for long-term access, you should use a refresh token. Refresh tokens don't expire and can be re-used repeatedly without manual user interaction. It's not possible to automatically access an account using only the app key and secret. You can find more information in the following resources:
We recommend using one of the official SDKs whenever possible though, as they'll do most of this work for you.
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!