I have looked at several posts here about issues very close to this one including one that is exactly the same but no one gave an answer so I am going to give it a go. I am very new to Python. My current homework is to connect to Spotify using their API. According to the documentation on authorization code flow in Spotify. the response to the authorization request should provide two items: code and state.
After I send my request
def authenticate_user():
auth_code = requests.get(ENPOINT_USER_AUTH, {
client_id : CLIENT_ID,
response_type : code ,
redirect_uri : https://www.example.com/ ,
scope : playlist-modify-private
})
print(f Auth code: {auth_code} )
我收到了一部《奥特法典》:和;Response [200]> 然而,答复并不包括法典或州。 不过,在答复中,我可以把斜线复制到浏览器上,再把我引向一辆带有该代码的电灯车。
My issue here is, I want to save that code into a variable in my Python code. This copy-pasting into a browser can t be the way to do this.
我的另一个问题是,我确实不知道打背服务器/转机是什么,如何利用或设置信息以提取这种信息,或者在我的假刑法中如何做到这一点。
基本上,我对许多开端人表示歉意。 但是,时间是研究和阅读时间,我确实希望提出一些意见。
This is what the redirect URL looks like after pasting the URL I get in the response.
https://www.example.com/?code=AQAqA0eYYk......JLVUomOR0ziDTcIupZoU
我希望这一点是明确的,我是明智的。
事先感谢你。
吴 Oh和我知道Spotipy,它本应简化事情,但我不感兴趣。 我想学会利用欧洲复兴开发银行。
www.un.org/Depts/DGACM/index_spanish.htm 简明扼要: 我如何能够从“URL”的回复中获取这一“代码”,并将它从我的《规则》中从方案上变成一个变量?