Class DbxAppInfo


public class DbxAppInfo extends Dumpable
Identifying information about your application.
  • Field Details

  • Constructor Details

    • DbxAppInfo

      public DbxAppInfo(String key)
      DbxAppInfo without secret. Should only be used in PKCE flow.
      Parameters:
      key - Dropbox app key (see getKey())
      See Also:
    • DbxAppInfo

      public DbxAppInfo(String key, String secret)
      Parameters:
      key - Dropbox app key (see getKey())
      secret - Dropbox app secret (see getSecret())
    • DbxAppInfo

      public DbxAppInfo(String key, String secret, DbxHost host)
      Parameters:
      key - Dropbox app key (see getKey())
      secret - Dropbox app secret (see getSecret())
      host - Dropbox host configuration (see getHost())
  • Method Details

    • getKey

      public String getKey()
      Returns the Dropbox app key (OAuth calls this the consumer key). You can create an app key and secret on the Dropbox developer website.
      Returns:
      Dropbox app key
    • getSecret

      public String getSecret()
      Returns the Dropbox app secret (OAuth calls this the consumer secret). You can create an app key and secret on the Dropbox developer website.

      Make sure that this is kept a secret. Someone with your app secret can impesonate your application. People sometimes ask for help on the Dropbox API forums and copy/paste their code, which sometimes includes their app secret. Do not do that.

      Returns:
      Dropbox app secret
    • getHost

      public DbxHost getHost()
      Returns the Dropbox host configuration.

      This is almost always DbxHost.DEFAULT. Typically this value will only be different for testing purposes.

      Returns:
      Dropbox host configuration
    • hasSecret

      public boolean hasSecret()
      Return if this DbxAppInfo contains app secret. DbxAppInfo without secret should only be used in DbxPKCEWebAuth.
      Returns:
      If this DbxAppInfo contains app secret.
    • dumpFields

      protected void dumpFields(DumpWriter out)
      Specified by:
      dumpFields in class Dumpable
    • getKeyFormatError

      public static String getKeyFormatError(String key)
      If they key's format looks correct, return null. Otherwise return a string that describes what the problem is.

      NOTE: This function only performs some cursory checks on the format of the key. Even if it returns null (which means "no problem"), it doesn't mean that what you passed in is an actual valid Dropbox API app key.

    • getSecretFormatError

      public static String getSecretFormatError(String key)
      If they secret's format looks correct, return null. Otherwise return a string that describes what the problem is.

      NOTE: This function only performs some cursory checks on the format. Even if it returns null (which means "no problem"), it doesn't mean that what you passed in is an actual valid Dropbox API app key.

    • getTokenPartError

      public static String getTokenPartError(String s)
    • checkKeyArg

      public static void checkKeyArg(String key)
    • checkSecretArg

      public static void checkSecretArg(String secret)