Class DbxOAuth1Upgrader

java.lang.Object
com.dropbox.core.DbxOAuth1Upgrader

public final class DbxOAuth1Upgrader extends Object
Lets you convert OAuth 1 access tokens to OAuth 2 access tokens. First call createOAuth2AccessToken(com.dropbox.core.DbxOAuth1AccessToken) to get an OAuth 2 access token. If that succeeds, call disableOAuth1AccessToken(com.dropbox.core.DbxOAuth1AccessToken) to disable the OAuth 1 access token.
  • Field Details

    • ResponseReader

      public static final JsonReader<String> ResponseReader
      For JSON parsing.
  • Constructor Details

    • DbxOAuth1Upgrader

      public DbxOAuth1Upgrader(DbxRequestConfig requestConfig, DbxAppInfo appInfo)
      Parameters:
      appInfo - Your application's Dropbox API information (the app key and secret).
  • Method Details

    • createOAuth2AccessToken

      public String createOAuth2AccessToken(DbxOAuth1AccessToken token) throws DbxException
      Given an existing active OAuth 1 access token, make a Dropbox API call to get a new OAuth 2 access token that represents the same user and app.
      Throws:
      DbxException
    • disableOAuth1AccessToken

      public void disableOAuth1AccessToken(DbxOAuth1AccessToken token) throws DbxException
      Tell the Dropbox API server to disable an OAuth 1 access token.
      Throws:
      DbxException