Class DbxAuthFinish


  • public final class DbxAuthFinish
    extends java.lang.Object
    When you successfully complete the authorization process, the Dropbox server returns this information to you.
    • Constructor Summary

      Constructors 
      Constructor Description
      DbxAuthFinish​(java.lang.String accessToken, java.lang.Long expiresIn, java.lang.String refreshToken, java.lang.String userId, java.lang.String teamId, java.lang.String accountId, java.lang.String urlState)  
      DbxAuthFinish​(java.lang.String accessToken, java.lang.Long expiresIn, java.lang.String refreshToken, java.lang.String userId, java.lang.String teamId, java.lang.String accountId, java.lang.String urlState, java.lang.String scope)  
      DbxAuthFinish​(java.lang.String accessToken, java.lang.String userId, java.lang.String accountId, java.lang.String teamId, java.lang.String urlState)
      Deprecated.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAccessToken()
      Returns an access token that can be used to make Dropbox API calls.
      java.lang.String getAccountId()
      Returns the Dropbox account ID of the user who just approved your app for access to their Dropbox account.
      java.lang.Long getExpiresAt()
      Returns the time when accessToken expires in millisecond.
      java.lang.String getRefreshToken()
      Returns an refresh token which can be used to obtain new accessToken .
      java.lang.String getScope()
      Return the scopes of current OAuth flow.
      java.lang.String getTeamId()
      Returns the Dropbox team ID of the team's user who just approved your app for access to their Dropbox account.
      java.lang.String getUrlState()
      Returns the state data you passed in to DbxWebAuth.start(java.lang.String).
      java.lang.String getUserId()
      Returns the Dropbox user ID of the user who just approved your app for access to their Dropbox account.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • BearerTokenTypeReader

        public static final JsonReader<java.lang.String> BearerTokenTypeReader
      • AccessTokenReader

        public static final JsonReader<java.lang.String> AccessTokenReader
    • Constructor Detail

      • DbxAuthFinish

        @Deprecated
        public DbxAuthFinish​(java.lang.String accessToken,
                             java.lang.String userId,
                             java.lang.String accountId,
                             java.lang.String teamId,
                             java.lang.String urlState)
        Deprecated.
        Parameters:
        accessToken - OAuth access token
        userId - Dropbox user ID of user that approved access to this app
        urlState - State data passed in to DbxWebAuth.start(java.lang.String) or null if no state was passed
      • DbxAuthFinish

        public DbxAuthFinish​(java.lang.String accessToken,
                             java.lang.Long expiresIn,
                             java.lang.String refreshToken,
                             java.lang.String userId,
                             java.lang.String teamId,
                             java.lang.String accountId,
                             java.lang.String urlState)
        Parameters:
        accessToken - OAuth access token.
        expiresIn - Duration time of accessToken in second.
        refreshToken - A token used to obtain new accessToken.
        userId - Dropbox user ID of user that authorized this app.
        teamId - Dropbox team ID of team that authorized this app.
        accountId - Obfusticated user or team id. Keep it safe.
        urlState - State data passed in to DbxWebAuth.start(java.lang.String) or null if no state was passed
      • DbxAuthFinish

        public DbxAuthFinish​(java.lang.String accessToken,
                             java.lang.Long expiresIn,
                             java.lang.String refreshToken,
                             java.lang.String userId,
                             java.lang.String teamId,
                             java.lang.String accountId,
                             java.lang.String urlState,
                             java.lang.String scope)
        Parameters:
        accessToken - OAuth access token.
        expiresIn - Duration time of accessToken in second.
        refreshToken - A token used to obtain new accessToken.
        userId - Dropbox user ID of user that authorized this app.
        teamId - Dropbox team ID of team that authorized this app.
        accountId - Obfusticated user or team id. Keep it safe.
        urlState - State data passed in to DbxWebAuth.start(java.lang.String) or null if no state was passed
        scope - A list of scope returned by Dropbox server. Each scope correspond to a group of API endpoints. To call one API endpoint you have to obtains the scope first otherwise you will get HTTP 401.
    • Method Detail

      • getAccessToken

        public java.lang.String getAccessToken()
        Returns an access token that can be used to make Dropbox API calls. Pass this in to the DbxClientV2 constructor.
        Returns:
        OAuth access token used for authorization with Dropbox servers
      • getExpiresAt

        public java.lang.Long getExpiresAt()
        Returns the time when accessToken expires in millisecond. If null then it won't expire. Pass this in to the DbxClientV2 constructor.
        Returns:
        OAuth access token used for authorization with Dropbox servers
      • getRefreshToken

        public java.lang.String getRefreshToken()
        Returns an refresh token which can be used to obtain new accessToken . Pass this in to the DbxClientV2 constructor.
        Returns:
        OAuth access token used for authorization with Dropbox servers
      • getUserId

        public java.lang.String getUserId()
        Returns the Dropbox user ID of the user who just approved your app for access to their Dropbox account. We use user ID to identify user in API V1.
        Returns:
        Dropbox user ID of user that approved your app for access to their account
      • getAccountId

        public java.lang.String getAccountId()
        Returns the Dropbox account ID of the user who just approved your app for access to their Dropbox account. We use account ID to identify user in API V2.
        Returns:
        Dropbox account ID of user that approved your app for access to their account
      • getTeamId

        public java.lang.String getTeamId()
        Returns the Dropbox team ID of the team's user who just approved your app for access to their Dropbox account. We use team ID to identify team in API V2.
        Returns:
        Dropbox team ID of team's that approved your app for access to their account
      • getScope

        public java.lang.String getScope()
        Return the scopes of current OAuth flow. Each scope correspond to a group of API endpoints. To call one API endpoint you have to obtains the scope first otherwise you will get HTTP 401.