android-components / mozilla.components.service.fxa / FirefoxAccount / getOAuthToken

# getOAuthToken

`fun getOAuthToken(scopes: Array<String>): FxaResult<OAuthInfo>` (source)

Fetches a new access token for the desired scopes using an internally stored refresh token.

### Parameters

`scopes` - List of OAuth scopes for which the client wants access

### Exceptions

`FxaException.Unauthorized` - if the token could not be retrieved (eg. expired refresh token)

Return
FxaResult<OAuthInfo> that stores the token, along with its scopes and keys when complete