You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
rs123
3 years agoNew member | Level 2
Getting refresh token for shiny app using rdrop2 and drop_auth()
I'm trying to create a shiny app, using R Studio, which links to my dropbox using the package rdrop2. I have successfully managed to deploy the app and it runs as planned for around 4 hours. Howe...
Здравко
Legendary | Level 20
Hi rs123,
Seems you are using unsupported SDK. Regular access tokens expire in 4 hours as you noted.
rs123 wrote:...
NB: I am aware that dropbox no longer allow tokens with no expiry (as of September 2021) so I need to go down the refresh token route.
Not exactly! Existing long lived access tokens (if you have any) keep validity. You can't create new such token; all new access tokens are short lived (but only access tokens). It's not the same for refresh tokens; they are without due date!
I don't know what exactly is available in your environment, but if there isn't newer version of the SDK, used by you, and supported SDKs can not be used in your case, you have to manage direct access points call (to receive and manage tokens, at least). You should make sure authorization rules are followed strictly and selected token type is "offline". So aside of the regular access token your application will receive refresh token too. When the due date gets close, you can use received refresh token to get a new regular access token in a /oauth2/token call. This should repeat on regular basis whenever need. The rest of the code could work without change with ensured valid access token. That's it.
Hope this helps.
rs123
3 years agoNew member | Level 2
Thank you very much for the information. I understand what you are saying I need to do, although my very limited experience in this matter is not allowing me to complete this. Do you have any resources on SDKs in R directly? I'm struggling to find any help on R that isn't related to the out of date SDK (rdrop2). I have looked at the links you provided and tried to follow the HTTP (since my programme wasn't listed) and some of the community SDKs but just not managing to get anywhere.
- Здравко3 years agoLegendary | Level 20
Unfortunately, I don't have any info on this regard.
Try edit the SDK used by you. Only the part related to authentication need changes, so shouldn't be a big deal. Just add there refresh token handling and... that's all (I hope the rest works properly). I can't say anything more.
Good luck.
- rs1233 years agoNew member | Level 2
Thank you for the help you have given, it is much appreciated!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,915 PostsLatest Activity: 2 days agoIf 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!