cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We've been busy working on some major updates to the Community, so check out what's changing, what’s staying the same and what you can expect from the Dropbox Community right here.

Discuss Dropbox Developer & API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: Raspberry Pi File Transfer: Access Token Keeps Expiring

Raspberry Pi File Transfer: Access Token Keeps Expiring

gsanvel
New member | Level 2

Hi all,

 

I'm new to this space and I'm having trouble making it so that my access token doesn't expire. I simply want to upload some videos that the Raspberry Pi cam record onto my Dropbox. Below is a picture of my code. Can someone help me make it such that the access token doesn't expire? I read something about refresh tokens and what not but I don't know how to do it.  Any helpful code snippet would be really helpful!!

 

Thanks in advance c:

 

P.S Even better, is there a way to just download Dropbox onto the raspberry-Pi such that I just have the linked folder there on the desktop? I have this version of the rasp-pi: https://www.amazon.com/gp/product/B08B6F8QRV/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1

gsanvel_0-1648579146155.png

 

 

 

2 Replies 2

Здравко
Legendary | Level 20

Hi @gsanvel,

Probably the "Access Key (hidding for privacy)" denotes the place for you access token. Take in mind that the access tokens, used in all API calls, validity is limited to 4 hours only! Maybe you have thought to use long lived access token. If so, you have to be aware that such tokens type is obsolete and their generation is dropped already, despite generated can still be used; i.e. you can't create new such token. Replacement of long lived access token is usage of refresh token. Take a look here how you can create a Dropbox client object in such a way. 😉 Once created you can use it in the way you want to.

Unfortunately Dropbox doesn't provide support for ARM hardware (the only exception is Apple's M1). 🤷

Hope this clarifies matter.

tahsini
Dropbox Staff

As @Здравко mentioned we have examples of OAuth within our python sdk that you can use for reference when implementing refresh tokens.

 

The SDK handles automatic refreshing of expired short-lived tokens so you do not need to do this on your own. You can see those examples of OAuth here

Need more support?