Start 2025 on time and up to date! Seamlessly integrate your calendars into Dropbox with these simple steps! 📆

Forum Discussion

mrivera's avatar
mrivera
Explorer | Level 4
5 years ago

Dropbox v2 api. Javascript app installed in Windows Server behind proxy

Hi all, 

 

I have this app which was built in Javascript (Meteor). Basically, the user saves some Word documents in Dropbox, using the DB web interfase. Then, users use the app to pass some data to build documents. The app needs to: 

 

1) connect to DropBox to get the list of Word files in a folder 

2) read the document (from DropBox) that the user selects to build the document from there 

 

So the problem is: the app can't connect to DB to get the list of files in a folder, apparently, because the server (Windows) is in a network which is behind a proxy. This is the error message the app receives: 

 

FetchError: request to https://api.dropboxapi.com/2/files/list_folder failed, reason: connect ETIMEDOUT 162.125.5.19:443

 

A similar situation ocurred when I had to install the app from GitHub. Clonning the app from GitHub didn't work until I saved the proxy settings in the config file. Then, the app was installed from GitHub pretty fine. Then config settings to establish proxy info for git to work are: 

 

[http]
proxy = http://siste02:<pwd here>@192.168.0.111:3128
[https]
proxy = http://siste02:<pwd here>.@192.168.0.111:3128

So, my question is: what do I need to do so that my app connects succesfully to DropBox in a case like this? 

 

Note that this app connects to DropBox perfectly fine in many others installations, which are similar like this one but with *no* proxy installed in the network. 

 

Many thanks and bye ... 

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

    Are you using the official Dropbox API v2 JavaScript SDK? That doesn't offer an option for specifying a proxy unfortunately, but I'll pass this along as a feature request. I can't promise if or when that might be implemented though. 

     

    If you're not using that SDK and are instead using some other library or client, you may be able to configure it to use a proxy, but we can't offer support for third party libraries/clients, so I'm afraid I can't offer guidance on that. You would need to refer to the documentation for that library/client.

    • mrivera's avatar
      mrivera
      Explorer | Level 4

      Hi Greg-DB, thanks for your answer. 

      Yes, I'm using official DB v2 API JS SDK. In fact, this is a sample of my code, just to retrieve a list of files from a DropBox folder: 

       

      ... 
      import { Dropbox } from 'dropbox';
      import fetch from 'isomorphic-fetch';
      ...
      
      try {
      const dbx = new Dropbox({ accessToken, fetch });
      
      const files0 = await dbx.filesListFolder({ path: folderPath });
      const files1 = files0.entries.filter(x => x[".tag"] === "file").map(x => ({ name: x.name }));
      
      files = lodash.orderBy(files1, ['name'], ['asc']);
      
      } catch (err) {
      ... 
      }

       

      So, you are telling me that I just can't run my code if the server is behind a proxy. Do I have other options? Maybe some path to research? I just have invested lots of my time developing this app and it is just running in a (Windows) server that is in a network which happens to be behind a proxy. 

       

      Many thanks ... 

       

       

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,929 PostsLatest Activity: 24 hours ago
338 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!