【发布时间】:2019-08-21 01:13:38
【问题描述】:
我正在尝试将 qwikcilver API 集成到我的项目中。他们使用 oauth1.0 进行身份验证。我正在为 oauth1.0 使用 requests-oauthlib python lib。
这是我的身份验证代码。
# Using OAuth1Session
oauth = OAuth1Session(client_key, client_secret=client_secret)
fetch_response = oauth.fetch_request_token(request_token_url)
{
"oauth_token": "Z6eEdO8MOmk394WozF5oKyuAv855l4Mlqo7hhlSLik",
"oauth_token_secret": "Kd75W4OQfb2oJTV0vzGzeXftVAwgMnEK9MumzYcM"
}
resource_owner_key = fetch_response.get('oauth_token')
resource_owner_secret = fetch_response.get('oauth_token_secret')
我的查询如下,
qwikcilver 有用户名和密码。我尝试了很多在代码中发送用户名和密码但没有工作。
requests-oauthlib请求函数中如何传递用户名和密码?
【问题讨论】:
标签: python oauth python-requests oauth-1.0a requests-oauthlib