We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.

Forum Discussion

sgvincent's avatar
sgvincent
New member | Level 2
2 years ago

Upload Files to Shared Folders via Zapier Integration

Within the Zapier integration, there is the ability to upload to Dropbox but not a Shared folder in Dropbox. After reading through the current API documentation it doesn't look like there is a programmatic method to do this either on an automated basis either. Am I misunderstanding or is there not a way to fully automate access to a Shared Folder to update folders?

  • Greg-DB's avatar
    Greg-DB
    2 years ago

    New Dropbox access tokens are short-lived and expire after a short period of time, but refresh tokens do not expire and can be stored and re-used repeatedly. Once you have a refresh token for an account, you do not need to do the https://www.dropbox.com/oauth2/authorize... step for that account again; you can instead programmatically use the refresh token to get a new access token without manual intervention.

     

    You can find more information in the OAuth Guide and authorization documentation. There's a basic outline of processing this flow in this blog post which may serve as a useful example.

     

     

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    The Dropbox API can be used to upload to a shared folder in a connected account. For instance, an app can call /2/files/upload with a "path" parameter containing a path inside a shared folder. Note though that you'd need to use an app with the "full Dropbox" access type, not "app folder", to be able to access shared folder.

     

    I suggest reading the File Access Guide for more information on referencing files with the API. Also, read the Team Files Guide for information on how to interact with team-owned content, such as if the folder is in the "team space".

    • sgvincent's avatar
      sgvincent
      New member | Level 2

      Hey Greg,

      The issue I am running into is the OAuth, even with a refresh token it expires pretty quickly and regenerating requires manual intervention each time. The goal is to have the code run each time its triggered in Zapier (and unfortunately requires using request libraries instead of the python sdk). Is there a way to go through this step 

      https://www.dropbox.com/oauth2/authorize?client_id=MY_CLIENT_ID&redirect_uri=MY_REDIRECT_URI&response_type=code

       

      and authorize without having to manually allow access each time?

      • Greg-DB's avatar
        Greg-DB
        Icon for Dropbox Staff rankDropbox Staff

        New Dropbox access tokens are short-lived and expire after a short period of time, but refresh tokens do not expire and can be stored and re-used repeatedly. Once you have a refresh token for an account, you do not need to do the https://www.dropbox.com/oauth2/authorize... step for that account again; you can instead programmatically use the refresh token to get a new access token without manual intervention.

         

        You can find more information in the OAuth Guide and authorization documentation. There's a basic outline of processing this flow in this blog post which may serve as a useful example.

         

         

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,877 PostsLatest Activity: 3 hours ago
325 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!