You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

Jeff B.63's avatar
Jeff B.63
Collaborator | Level 8
2 years ago

Get a folders public link using the dropbox API in Azure logic apps

We use Dropbox to store pictures from every jobsite we work on.  The estimator puts his pics in the folder for the crews to view and later the crews put their images in the same folder.  I have been using an Azure logic app to create the folders I need by using a constructed folder path and creating a txt file. I then delete the file afterwards.   But I can't find any way to get the public link for the folder using Logic Apps. 

 

 

I can do it in Zappier but that just gets stupid expensive in short order. 

 

Has anyone found a way to get the public link?


  • Jeff B.63 wrote:

    The example in the blog uses curl but I need HTTP.  I tried the online conversion tool from GitHub but it just gets syntax errors.  ...


    Hi Jeff B.63,

    You can add -v option (verbose) in every curl command and you'll get entire HTTP request in the console output as is. 😉

     


    Jeff B.63 wrote:

    ...  I have my AppKey and AppSecret but what is the authorization code and do I need a redirect URI since I want the response to come right back to the HTTP request?


    The authorization code is something you should receive from the authorization page where you (or your application user - whoever is) grant permission to access account resources. It can be copied by hand or received automatic using redirect URI - the choice is yours. So, no, it's not mandatory usage of redirect URI. Take a look here how you can perform the same without redirect URI.

    Hope this helps.

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

    The Dropbox API does offer the ability to create and retrieve shared links programmatically.

     

    To create a shared links for a file or folder, you should call the /2/sharing/create_shared_link_with_settings endpoint. To retrieve existing shared links, you would call /2/sharing/list_shared_links.

     

    By the way, those are links to the documentation for the HTTPS endpoints themselves, but we recommend using one of the official SDKs if possible. Those have corresponding native methods for the HTTPS endpoints.

    • Jeff B.63's avatar
      Jeff B.63
      Collaborator | Level 8

      This is a little outside my wheelhouse but I am giving it a go.  This is what I have tried but something is wrong and I am not sure if I am on the right track or not.  Some guidance would be appreciated.

       

      Here is the raw input:

      {
          "method""GET",
          "queries": {
              "direct_only""true",
              "path""/~ Pictures - All/2023/236056 - 459 Jellicoe Cres/"
          },
          "headers": {
              "Authorization""*sanitized*",
              "Content-Type""application/json"
          }
      }
       
      And here is the raw output:
      {
          "statusCode"404,
          "headers": {
              "Date""Mon, 24 Apr 2023 20:37:35 GMT",
              "Server""envoy",
              "Vary""Accept-Encoding",
              "X-Dropbox-Response-Origin""far_remote",
              "X-Dropbox-Request-Id""43295fb3e28a44578e11c9600a9e2579",
              "Transfer-Encoding""chunked",
              "Content-Type""text/html"
          },
       
      Error (404) We can't find the page you're looking for. 
      }
      • Здравко's avatar
        Здравко
        Legendary | Level 20

        Jeff B.63, Take a look on documentation! There POST request is always used. 🙋 GET is not for listing. The call parameters have to reside in request body, JSON encoded (as you correctly have specified in a header). Where is this JSON right now? 🧐😉