Package com.dropbox.core
Class DbxAuthFinish
java.lang.Object
com.dropbox.core.DbxAuthFinish
When you successfully complete the authorization process, the Dropbox server returns
this information to you.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonReader<String> static final JsonReader<String> static final JsonReader<DbxAuthFinish> For JSON parsing. -
Constructor Summary
ConstructorsConstructorDescriptionDbxAuthFinish(String accessToken, Long expiresIn, String refreshToken, String userId, String teamId, String accountId, String urlState) DbxAuthFinish(String accessToken, Long expiresIn, String refreshToken, String userId, String teamId, String accountId, String urlState, String scope) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionReturns an access token that can be used to make Dropbox API calls.Returns the Dropbox account ID of the user who just approved your app for access to their Dropbox account.Returns the time whenaccessTokenexpires in millisecond.Returns an refresh token which can be used to obtain newaccessToken.getScope()Return the scopes of current OAuth flow.Returns the Dropbox team ID of the team's user who just approved your app for access to their Dropbox account.Returns the state data you passed in toDbxWebAuth.start(java.lang.String).Returns the Dropbox user ID of the user who just approved your app for access to their Dropbox account.
-
Field Details
-
Reader
For JSON parsing. -
BearerTokenTypeReader
-
AccessTokenReader
-
-
Constructor Details
-
DbxAuthFinish
@Deprecated public DbxAuthFinish(String accessToken, String userId, String accountId, String teamId, String urlState) Deprecated.- Parameters:
accessToken- OAuth access tokenuserId- Dropbox user ID of user that approved access to this appurlState- State data passed in toDbxWebAuth.start(java.lang.String)ornullif no state was passed
-
DbxAuthFinish
public DbxAuthFinish(String accessToken, Long expiresIn, String refreshToken, String userId, String teamId, String accountId, 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 toDbxWebAuth.start(java.lang.String)ornullif no state was passed
-
DbxAuthFinish
public DbxAuthFinish(String accessToken, Long expiresIn, String refreshToken, String userId, String teamId, String accountId, String urlState, 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 toDbxWebAuth.start(java.lang.String)ornullif no state was passedscope- 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 Details
-
getAccessToken
Returns an access token that can be used to make Dropbox API calls. Pass this in to theDbxClientV2constructor.- Returns:
- OAuth access token used for authorization with Dropbox servers
-
getExpiresAt
Returns the time whenaccessTokenexpires in millisecond. If null then it won't expire. Pass this in to theDbxClientV2constructor.- Returns:
- OAuth access token used for authorization with Dropbox servers
-
getRefreshToken
Returns an refresh token which can be used to obtain newaccessToken. Pass this in to theDbxClientV2constructor.- Returns:
- OAuth access token used for authorization with Dropbox servers
-
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
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
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
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. -
getUrlState
Returns the state data you passed in toDbxWebAuth.start(java.lang.String). If you didn't pass anything in, or you usedDbxWebAuthNoRedirect, this will benull.- Returns:
- state data passed into
DbxWebAuth.start(java.lang.String), ornullif no state was passed
-