带有python请求的Trello OAuth 1.0
我想通过url带有python请求的Trello OAuth 1.0,python,oauth,python-requests,trello,Python,Oauth,Python Requests,Trello,我想通过url获取私有trello板数据https://trello.com/b/VLtX3aOw/board_name.json 当我执行requests.get(json_url)时,我获得了请求的未经授权的权限 无法理解如何使用OAuth 1.0 我已经有了api_密钥、令牌和api_机密 复制注释:尝试时出现相同错误: from requests_oauthlib import OAuth1Session trl = OAuth1Session('trello_api_key', c
获取私有trello板数据https://trello.com/b/VLtX3aOw/board_name.json
当我执行requests.get(json_url)
时,我获得了请求的未经授权的权限
无法理解如何使用OAuth 1.0
我已经有了api_密钥、令牌和api_机密
复制注释:尝试时出现相同错误:
from requests_oauthlib import OAuth1Session
trl = OAuth1Session('trello_api_key', client_secret='trello_api_secret')
url = 'trello.com/b/VLtX3aOw/board_name.json'
r = trl.get(url)
https://trello.com/1/authorize?expiration=1day&name=MyPersonalToken&scope=read&response_type=token&key={YourAPIKey}
您还可以使用expiration=never
代替1day
从请求\u oauthlib导入OAuth1Session
api\U密钥=您的api\U密钥
api\u secret=您的api\u secret
令牌=您的\u令牌
trello=OAuth1Session(api_密钥、api_密钥、令牌)
url='1〕https://trello.com/b/VLtX3aOw/board_name.json'
r=trello.get(url)
打印(r.json())
直接从请求oauth文档:在尝试时得到相同的错误:从请求导入OAuth1Session trl=OAuth1Session('trello_api_key',client_secret='trello_api_secret')url='r=trl.get(url)related