One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
mrivera
5 years agoExplorer | Level 4
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 ...
Greg-DB
Dropbox Staff
5 years agoAre 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
5 years agoExplorer | 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 ...
- Greg-DB5 years ago
Dropbox Staff
The official Dropbox API v2 JavaScript SDK unfortunately doesn't have a way to specify a proxy. It is open source though, so you could fork and modify it as needed. For instance, it looks like isomorphic-fetch allows you to supply a proxy via an 'agent' option. You may want to try modifying the SDK to allow you to set that option, e.g., in the locations where the options are defined in the SDK here.
- mrivera5 years agoExplorer | Level 4
Hi and thanks,
Does the api works through an specific address?
Can I ask the network admin people to open some IP or Port or both?
I mean, can I configure (or ask the appropiate person) the proxy to allow making such calls?
For example, the error message I get when trying the API call is this:
FetchError: request to https://api.dropboxapi.com/2/files/list_folder failed, reason: connect ETIMEDOUT 162.125.5.19:443
So, there can be some way to config the proxy so those api calls go through?
Many thanks ...
- Здравко5 years agoLegendary | Level 20
mrivera wrote:...
Does the api works through an specific address?
...Hi mrivera,
While the words are going on about network API, there is always some kind of address (either domain name or IP). In particular case addresses are pointed by domain names.
mrivera wrote:
...Can I ask the network admin people to open some IP or Port or both?
I mean, can I configure (or ask the appropiate person) the proxy to allow making such calls?
...
🤔 Does your proxy restrict you to make external connection? If there is some firewall and the settings are restrictive for external connections (for some reason, which is something unusual), then you should ask for access. Are you restricted to access Dropbox site on the particular machine? If not, most likely you don't have to do anything. 😉
mrivera wrote:
...FetchError: request to https://api.dropboxapi.com/2/files/list_folder failed, reason: connect ETIMEDOUT 162.125.5.19:443
So, there can be some way to config the proxy so those api calls go through?
...
🙂 Don't think for "way to config the proxy"! On first place you should think for way to connect to the proxy. The error, you get, shows 2 things: the application successfully resolve the domain name to IP (i.e. your DNS works) and outbound connections are restricted when skipping proxy (something expected). The pointed IP and port here (something which confuses you most probably) represent address of target Dropbox server. That is NOT your machine/network address or port! 😉 Again, if your firewall (if any) doesn't restrict access to this address (most likely), you shouldn't worry about this address and the proxy config. The only thing you have to do is, as Greg-DB mentioned, make the proxy connection possible, either yourself or wait for new SDK release dealing with this. That's it.
Hope this clarifies matter.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,941 PostsLatest Activity: 2 days ago
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!