Class DbxAppClientV2


  • public class DbxAppClientV2
    extends DbxAppClientV2Base
    Use this class to make remote calls to the Dropbox API app endpoints. App endpoints expose actions you can perform as a Dropbox app without user authorization. You'll need your app key and secret. You can create an app key and secret on the Dropbox developer website.

    This class has no mutable state, so it's thread safe as long as you pass in a thread safe HttpRequestor implementation.

    • Constructor Detail

      • DbxAppClientV2

        public DbxAppClientV2​(DbxRequestConfig requestConfig,
                              java.lang.String key,
                              java.lang.String secret)
        Creates a client that uses the given app key and secret when performing requests against the default Dropbox hosts.
        Parameters:
        requestConfig - Default attributes to use for each request
        key - Dropbox app key (e.g. consumer key in OAuth)
        secret - Dropbox app secret (e.g. consumer secret in OAuth)
      • DbxAppClientV2

        public DbxAppClientV2​(DbxRequestConfig requestConfig,
                              java.lang.String key,
                              java.lang.String secret,
                              DbxHost host)
        Same as DbxAppClientV2(DbxRequestConfig, String, String) except you can also set the hostnames of the Dropbox API servers. This is used in testing. You don't normally need to call this.
        Parameters:
        requestConfig - Default attributes to use for each request
        key - Dropbox app key (e.g. consumer key in OAuth)
        secret - Dropbox app secret (e.g. consumer secret in OAuth)
        host - Dropbox hosts to send requests to (used for mocking and testing)
      • DbxAppClientV2

        public DbxAppClientV2​(DbxRequestConfig requestConfig,
                              java.lang.String key,
                              java.lang.String secret,
                              DbxHost host,
                              java.lang.String userId)
        Same as DbxAppClientV2(DbxRequestConfig, String, String) except you can also set the hostnames of the Dropbox API servers. This is used in testing. You don't normally need to call this.
        Parameters:
        requestConfig - Default attributes to use for each request
        key - Dropbox app key (e.g. consumer key in OAuth)
        secret - Dropbox app secret (e.g. consumer secret in OAuth)
        host - Dropbox hosts to send requests to (used for mocking and testing)
        userId - The user ID of the current Dropbox account. Used for multi-Dropbox account use-case.