I want to upload files in admin's Dropbox account(eg: admin@xyz.com), When someone register on my site and upload files. The files should upload on Admin's Dropbox account. I am using nodejs, When I try to use API to upload files into Dropbox. It requires authentication(Admin's credentials of Dropbox). Is there any way to use Dropbox API with Grant-type Password to upload files in developer's account.
Asked
Active
Viewed 166 times
1 Answers
1
The Dropbox API does not offer a way to upload programmatically using the username/password, but instead you should get an access token for the desired account, and store and re-use that. You can get an access token for an arbitrary account via the OAuth app authorization flow:

Greg
- 16,359
- 2
- 34
- 44
-
Ok I got it, But is there any expiration time for the access token. If there is an expiry time for the access token, then what I can do? Does Dropbox API offer refresh token? – Harpal Singh Aug 23 '18 at 06:23
-
Can I use Generated access token which is generated while registering API. – Harpal Singh Aug 23 '18 at 12:25
-
@HarpalSingh No, Dropbox API access tokens don't expire by themselves, but they can be revoked by the user or app. The Dropbox API does not use refresh tokens. Yes, you can use the generated access token the same way as any other access token. – Greg Aug 23 '18 at 14:59
-
For reference, the Dropbox API now offers short-lived access tokens and refresh tokens. You can find more information here: https://dropbox.tech/developers/migrating-app-permissions-and-access-tokens – Greg Nov 30 '20 at 20:10