One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
aalok
3 years agoExplorer | Level 4
generate code by using curl dropbox api
I don't want user interaction to click and allow a button to get code. I want to get it through curl or api.
- Greg-DB
Dropbox Staff
It is not possible to fully automate the OAuth process where the user chooses to authorize the app and the app then receives the resulting access token and optional refresh token. This needs to be done manually by the user at least once. If your app needs to maintain long-term access without the user manually re-authorizing it repeatedly, the app should request "offline" access so that it gets a refresh token. The refresh token doesn't expire and can be stored and used repeatedly to get new short-lived access tokens whenever needed, without the user manually reauthorizing the app.
You can find more information on this in the OAuth Guide and authorization documentation.
- aalokExplorer | Level 4
Any curl API to get refresh token and how to check whether access token expired or not.plz, send me an updated API document link.
- ЗдравкоLegendary | Level 20
Hi aalok,
A minimalistic example of what you're asking for can be seen here. The example shows API access using CURL, but it's the same while using any other way/HTTP access method (HTTP client). Of course, once get familiar with the OAuth' idea, you can extend the example to use different authentication methods (PKCE, for instance) and improve automation (with a loopback port to get the code without copy/paste, using 'netcat' for example or similar). 😉
Hope this helps.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,941 PostsLatest Activity: 13 hours ago
If you need more help you can view your support options (expected response time for an email or 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!