我使用以下方法从API获取令牌:
# fetch the token
res = requests.post(url, data={"email": email, "password": password})
token_json = res.json()
# now can use the api
res = requests.post(authenticated_url, headers={
"Authorization": "Bearer %s" % token_json['access']
}
data = res.json()
我要怎么在养蜂场设置这个?我见过的最接近使用身份验证的方法是this:
目前没有回答
相关问题 更多 >
编程相关推荐