cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to know what we learned at IBC? Check out our learnings on media, remote working and more right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

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

Re: Hardcode authentication/api to a single Dropbox account?

Hardcode authentication/api to a single Dropbox account?

Brendan C.
New member | Level 1

Hello - new to the Dropbox API and wondering if it's possible to hardcode the Dropbox account that an app using the API would authenticate/connect to?

In other words - when a user takes some action in my app - I want to save the file output of that action to MY Dropbox account, not ask them to authenticate into their account.

Let me know if that doesn't make sense!

Thanks,
Brendan

3 Replies 3

Jason C.
New member | Level 1

I would recommend you to have a server to automatically upload files to your dropbox, rather than hard-coding your keys and keys in your app which could potentially allow people to upload whatever they want (malware, executables) and how much they want.

If you really want hard code your keys, you can try using the OAuth API https://www.dropbox.com/developers/core/docs to generate a key, and then hardcode that key for requests in your app.

Greg-DB
Dropbox Staff

The API was designed with the intention that each user would link their own Dropbox account, in order to interact with their own files. However, it is technically possible to connect to just one account. The SDKs don't offer explicit support for it and we don't recommend doing so, for various technical and security reasons.

However if you did want to go this route, instead of kicking off the authorization flow, you would manually use an existing access token for your app. (Just be careful not to revoke it, e.g. via https://www.dropbox.com/account/security .)

Brendan C.
New member | Level 1

@Jason yep, that makes sense, but doing everything client side for this app since I'm being lazy and trying to build a prototype.

@Greg K - got it yeah, kinda figured that, so would need to get a valid token and then hardcode that into the flow... I understand the risks there of course...

I'm basically trying to use dropbox as a file server that can receive a new file then spit out a dl link that can be shared, kind of a janky use case.

Need more support?