cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox 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: Maui app to upload to dropbox

Maui app to upload to dropbox

Gcleanwood
Explorer | Level 3

Hi,

 

I want to develop an app with .net maui for just five people. One function of this app is to upload files (mostly photos) to one Dropbox. Can this be done without forcing them to enter the Dropbox credentials? Or is there a better way to do this?

 

Many thanks and have a nice weekend!

6 Replies 6

Здравко
Legendary | Level 20

@Gcleanwood wrote:

... Can this be done without forcing them to enter the Dropbox credentials?...


Hi @Gcleanwood,

There is always some way. You can always pre-generate credential information that becomes part of your application. Such a way targets server side applications and is strongly discouraged to be used in user side applications (like the one you plan create). Cons for using pre-authorized application is that everybody that take access to your application (somehow; doesn't matter how exactly) will gain access to the target account (i.e. security issue)! Another cons of using common credentials is inability of users to control alone the access; for instance if somebody (like you) by mistake invalidate the credentials, all users become affected and the application has to be distributed with valid credentials anew (or some patch, at least). 🤔 The choice is yours, but better create application that manage user access in a regular manner and all users get access to their accounts while sharing needed content (that on another way may be managed by the same or other application). Of course, many other factors (usage specifics) may impact weight of all pros and cons and affect your decision.

Good luck.

Gcleanwood
Explorer | Level 3

Thanks for the quick reply!

 

Would it be better to share a password secured folder? The password would be handed over separately. Or is it even possible to share that folder secured by OAUTH, with different credentials for each user?

 

Thanks, and have a nice weekend!

 

Здравко
Legendary | Level 20

@Gcleanwood wrote:

...

Would it be better to share a password secured folder? ...


There is NO such thing like "password secured folder". Don't mess password protected shared link, it's different thing! You cannot upload something using such link; such way may be used if you need to inspect/download something already in the account (i.e. in opposite direction).

Folder is secure shared to desired account(s), those you want to. You can share with different access privileges - like view only or edit. You don't need additional password for all of this and it's not supported. Again additional password is usable for shared link pointing either to file or to folder; only for a link additional password has some meaning.

 


@Gcleanwood wrote:

... Or is it even possible to share that folder secured by OAUTH, with different credentials for each user?

...


😀Seems you mess authentication/authorization with actual actions (including sharing). They are different things! 😉 Pay attention. OAuth 2 is needed to gain access to some/any particular account and initiate any action you may need. And yes, there are endpoints serving shared folders, available using all SDKs if you would use some.

You can use Dropbox Java SDK/Dot NET SDK. Take a look here/here for PKCE OAuth2 flow tool. Here/here you can see Dropbox client documentation. Some examples/examples are available too.

Hope this helps.

Greg-DB
Dropbox Staff

@Gcleanwood The API was designed with the intention that each user would link their own Dropbox account, in order to interact with their own files. As Здравко mentioned, while it is technically possible to always connect to just one account for all users, we do not officially support this, for various technical and security reasons.

 

You may be interested in using the GetTemporaryUploadLinkAsync method, as long as you don't expose the actual access/refresh tokens for your account to other users.

Здравко
Legendary | Level 20

@Greg-DB wrote:

...

You may be interested in using the GetTemporaryUploadLinkAsync method, as long as you don't expose the actual access/refresh tokens for your account to other users.


How will be such method in use without exposing any token? 🤔 Maui is designed and usable for local applications (no server side)!

Greg-DB
Dropbox Staff

@Здравко Thanks for the note. Yes, that would require the use of some server-side component.

Need more support?