spotify.py 文件源码

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

项目:spotify-connect-scrobbler 作者: jeschkies 项目源码 文件源码
def request_authorization(self):
        """Returns an URL the user has to follow to authorize this app."""

        # Requests authorization
        request_secret = secrets.token_hex()
        payload = {
            'client_id': self.__client_id,
            'response_type': 'code',
            'redirect_uri': 'https://localhost:4000/steps/2',
            'scope': 'user-read-recently-played',
            'state': request_secret
        }
        params = ("{}={}".format(param, value)
                  for param, value
                  in payload.items())
        auth_url = 'https://accounts.spotify.com/authorize?{}'.format(
                '&'.join(params))
        return auth_url
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号