HOW TO ACCESS DROPBOX FILES

Giorgio Sfiligoi 656 Reputation points
2026-09-17T10:25:12.6933333+00:00

I would like to access my files stored in Dropbox from a NET MAUI app.

Can anybody provide a tutorial or sample?

Developer technologies | .NET | .NET Multi-platform App UI

3 answers

Sort by: Most helpful
  1. Harry Nguyen (WICLOUD CORPORATION) 5 Reputation points Microsoft External Staff Moderator
    2026-09-18T06:37:34.8966667+00:00

    Hi @Giorgio Sfiligoi ,

    Thanks for sharing the details and the issues you encountered. I looked into this further, and here is a straightforward approach you can use to access Dropbox files from a .NET MAUI application.

    1. Set up the Dropbox app

    Start by creating an app in the Dropbox App Console.

    Choose the content access based on what your application needs:

    • App Folder if your app only needs access to its own Dropbox folder.
    • Full Dropbox if it needs access to existing content elsewhere in the user's Dropbox.

    Then enable only the permissions required for the operations your application needs. For example:

    • files.metadata.read for listing and browsing files and folders.
    • files.content.read for reading or downloading file content.
    • files.content.write if you later need to upload files.

    2. Add the Dropbox .NET SDK

    Install the official Dropbox SDK in your MAUI project:

    dotnet add package Dropbox.Api 
    

    For an initial test with your own Dropbox account, you can generate an access token from the OAuth 2 section of your Dropbox app settings.

    I would recommend using this initially to verify that the Dropbox app configuration, permissions, and file operations are working correctly. The token should not be embedded in your source code or included in a distributed application.

    List files from the MAUI application

    Once you have a test access token, you can create a DropboxClient and use the Files API:

    using Dropbox.Api; 
    
    public async Task ListFilesAsync(string accessToken) 
    
    { 
    
       using var client = new DropboxClient(accessToken); 
    
       var result = await client.Files.ListFolderAsync(string.Empty); 
    
       foreach (var entry in result.Entries) 
    
       { 
    
           System.Diagnostics.Debug.WriteLine(entry.Name); 
    
       } 
    
    } 
    

    The returned entries can then be displayed in a MAUI CollectionView or another UI control.

    To browse a specific folder, pass its Dropbox path to ListFolderAsync. If Dropbox indicates that additional entries are available, make sure to handle pagination rather than relying only on the first result.

    3. Read or download a selected file

    Once listing and folder navigation are working, you can use the same DropboxClient to retrieve the content of a selected file.

    For example, for a small text file, the application can download the content and display it in the MAUI UI. This requires the corresponding content-read permission in addition to metadata access.

    I would start by confirming that listing, browsing, and reading a file work correctly before extending the application with additional operations such as saving downloads locally or uploading files.

    The Dropbox API Explorer can also help verify individual Dropbox API requests and permissions independently. However, it is primarily a Dropbox API testing resource rather than a .NET MAUI-specific implementation guide.

    If you found my response helpful or informative, I would greatly appreciate it if you could follow this guide for your confirmation.

    Thank you.

    Was this answer helpful?


  2. Senthil kumar 2,420 Reputation points
    2026-09-17T12:08:32.8866667+00:00

    Hi @Giorgio Sfiligoi

    Attached the link for tutorial and sample documents.

    Dropbox .NET SDK

    https://github.com/dropbox/dropbox-sdk-dotnet

    Dropbox OAuth Guide

    https://developers.dropbox.com/oauth-guide

    Dropbox API Explorer

    https://dropbox.github.io/dropbox-api-v2-explorer/

    Thanks

    Was this answer helpful?


  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    1 deleted comment

    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.