Package com.spotify.sdk.android.auth
Class TokenExchangeResponse
java.lang.Object
com.spotify.sdk.android.auth.TokenExchangeResponse
Response from a token exchange request.
Contains either the access token information or error details.
-
Method Details
-
isSuccess
public boolean isSuccess()- Returns:
- true if the token exchange was successful, false otherwise
-
getAccessToken
- Returns:
- the access token if successful, null otherwise
-
getTokenType
- Returns:
- the token type (usually "Bearer") if successful, null otherwise
-
getExpiresIn
public int getExpiresIn()- Returns:
- the number of seconds the access token is valid for, 0 if not provided or on error
-
getScope
- Returns:
- the scope of the access token if provided, null otherwise
-
getRefreshToken
- Returns:
- the refresh token if provided, null otherwise
-
getError
- Returns:
- the error code if the request failed, null if successful
-
getErrorDescription
- Returns:
- the error description if the request failed, null if successful
-