spotify.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:spotify-connect-scrobbler 作者: jeschkies 项目源码 文件源码
def refresh_access_token(self, refresh_token):
        """ Returns the access token for Spotify Web API using a refresh token.

        Args:
            refresh_token (string): The token has been returned by the access
            token request.

        Returns:
            SpotifyCredentials: The parsed response from Spotify.
        """
        # Get new auth token
        payload = {
            'grant_type': 'refresh_token',
            'refresh_token': refresh_token
        }
        headers = self._make_authorization_headers()
        return requests.post(
            'https://accounts.spotify.com/api/token',
            data=payload,
            headers=headers
        ).json()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号