def _do_retrieve_scopes(self, http, token):
logger.info('<STR_LIT>')<EOL>query_params = {'<STR_LIT>': token, '<STR_LIT>': '<STR_LIT>'}<EOL>token_info_uri = _helpers.update_query_params(<EOL>self.token_info_uri, query_params)<EOL>resp, content = transport.request(http, token_info_uri)<EOL>content = _helpers._from_bytes(content)<EOL>if resp.status == http_client.OK:<EOL><INDENT>d = json.loads(content)<EOL>self.scopes = set(_helpers.string_to_scopes(d.get('<STR_LIT>', '<STR_LIT>')))<EOL><DEDENT>else:<EOL><INDENT>error_msg = '<STR_LIT>'.format(resp.status)<EOL>try:<EOL><INDENT>d = json.loads(content)<EOL>if '<STR_LIT>' in d:<EOL><INDENT>error_msg = d['<STR_LIT>']<EOL><DEDENT><DEDENT>except (TypeError, ValueError):<EOL><INDENT>pass<EOL><DEDENT>raise Error(error_msg)<EOL><DEDENT>
Retrieves the list of authorized scopes from the OAuth2 provider.

        Args:
            http: an object to be used to make HTTP requests.
            token: A string used as the token to identify the credentials to
                   the provider.

        Raises:
            Error: When refresh fails, indicating the the access token is
                   invalid.