我正在尝试使用 oauth 验证 api 调用我有消费者密钥和秘密,所以希望只使用 DotNetOpenOAuth 和嘿 presto,但是在经历了令人沮丧的一天和头痛之后,我无法弄清楚..
我有以下示例 - 使用 python-oauth2 库在 python 中工作 - 任何人都对如何翻译这个有任何经验/想法?我能找到的一切都是处理基于用户的回调 url——但在这里我只有一个更复杂的旧用户/密码版本(知道它有点复杂——但希望能得到我的要点!)
consumer=oauth.Consumer(key='CONSUMERKEY', secret='ITSASECRET')
# Your unique key:
token= oauth.Token('CLIENTKEY','ITSASECRET')
# The client object which combines both consumer and token:
client = oauth.Client(consumer, token=token)
# To figure out what reporting options you have, first run the following:
response_headers, response_content = client.request(url)
# The below will display the reporting options you have available:
print cjs
on.dumps(response_content)
编辑:更新以反映这是 OAuth 1.0,而不是 2