cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Java SDK V2 SSL Example / How do you do it?

Java SDK V2 SSL Example / How do you do it?

outsidecoder
Helpful | Level 5
Go to solution

Thanks for opening.

I'm looking to use the Java SDK for Dropbox API V2 with SSL with some clients, and I've realised recently I've not been connecting with SSL.

How could I modify the code below to allow me to connect via SSL? 

 

    public void Connect() throws DbxException {
        System.out.println("his.details.getACCESS_TOKEN() = " + this.details.getACCESS_TOKEN());
        // Create Dropbox client
        config = new DbxRequestConfig(this.details.getClientIdentifier());
        client = new DbxClientV2(config, this.details.getACCESS_TOKEN());
        FullAccount account = client.users().getCurrentAccount();
        System.out.println(account.getName().getDisplayName());
    }

 

I've not been able to find any examples of this being done, but I've noticed SSLConfig but with no examples of it being used.  I thought SSL would be promoted to mitigate any security concerns.

Thanks 🙂

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

All Dropbox API calls occur over standard HTTPS connections (specifically, currently using TLS v1.0, v1.1, or v1.2) initiated from the client sent to the Dropbox API servers, so that would just be destination port 443. That is the same regardless of geographic location and can't be changed.

You can find the official list of domains used by Dropbox in the help center here:

https://help.dropbox.com/security/official-domains

For the API in particular, the specific ones are:

  • api.dropboxapi.com
  • content.dropboxapi.com
  • notify.dropboxapi.com
  • api.dropbox.com
  • api-content.dropbox.com
  • api-notify.dropbox.com

View solution in original post

5 Replies 5

Greg-DB
Dropbox Staff
Go to solution

The Dropbox API requires SSL/TLS for all API calls, and the Java SDK uses SSL/TLS by default. You don't need to configure anything to get it to do so.

Can you elaborate on what you mean when you say you've "not been connecting with SSL"?

outsidecoder
Helpful | Level 5
Go to solution

Thanks for the prompt reply.  I was watching the traffic on my ports and nothing seemed to use port 443 which I think is the SSL port.  Which port(s) does the Java SDK use?

Greg-DB
Dropbox Staff
Go to solution

SSL/TLS connections do use port 443 on the destination server (the Dropbox API servers in this case). 

When you say you were watching the traffic on your ports, do you mean you were looking at the source ports? Those wouldn't necessarilly be 443; 443 would be the destination port.

outsidecoder
Helpful | Level 5
Go to solution

Apologies for the late reply.

Essentially when I go into production with my product I need to detail the demands of using the Dropbox SDK on the firewall.

For my purposes I will be using Asynchronous and Synchronous transfers within the SDK, but not utilsing the Sync features within the SDK.

For the functionality utilised above, can Dropbox explicitely define the following:-

  1. Which ports need to be opened.
  2. which ports need to be bi-directional, and which need to be single direction, and in which direction they should be.
  3. What protocols will be used on those ports.  Would it just be HTTP traffic?
  4. What domains need to be accessible for UK customers.
  5. Can the ports detalied in question 1, be changed and if so how can this be acheived?

Thanks for any assistance 🙂

Greg-DB
Dropbox Staff
Go to solution

All Dropbox API calls occur over standard HTTPS connections (specifically, currently using TLS v1.0, v1.1, or v1.2) initiated from the client sent to the Dropbox API servers, so that would just be destination port 443. That is the same regardless of geographic location and can't be changed.

You can find the official list of domains used by Dropbox in the help center here:

https://help.dropbox.com/security/official-domains

For the API in particular, the specific ones are:

  • api.dropboxapi.com
  • content.dropboxapi.com
  • notify.dropboxapi.com
  • api.dropbox.com
  • api-content.dropbox.com
  • api-notify.dropbox.com
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    outsidecoder Helpful | Level 5
What do Dropbox user levels mean?