def get_token(self, code, **params):
params['<STR_LIT:code>'] = code<EOL>if '<STR_LIT>' not in params:<EOL><INDENT>params['<STR_LIT>'] = self.default_grant_type<EOL><DEDENT>params.update({'<STR_LIT>': self.client_id,<EOL>'<STR_LIT>': self.client_secret,<EOL>'<STR_LIT>': self.redirect_uri})<EOL>response = self.http_post(self.token_uri, params)<EOL>try:<EOL><INDENT>return response.json()<EOL><DEDENT>except TypeError:<EOL><INDENT>return response.json<EOL><DEDENT>
Get an access token from the provider token URI.

        :param code: Authorization code.
        :type code: str
        :return: Dict containing access token, refresh token, etc.
        :rtype: dict