upwork-api client.auth.get_request_token() 返回(空,空) [英] upwork-api client.auth.get_request_token() returns (null,null)
问题描述
我正在使用 Python 中的 upwork API 迈出我的第一步,但我停留在第一步.
我正在学习教程,但无法从 oauth 获取令牌.
I am moving my first steps with the upwork API in python, but I am stuck at the first steps.
I am following the tutorials but I cannot get the tokens from oauth.
upwork.ca_certs_locater.LINUX_PATH = 'C:\\Users\\somedir\\cacert.pem'
client = upwork.Client(upwork_key, upwork_secret)
print("Please to this URL (authorize the app if necessary):")
print(client.auth.get_authorize_url())
print("After that you should be redirected back to your app URL with " +
"additional ?oauth_verifier= parameter")
upwork 库似乎安装正确,.pem 文件也正确加载,我想我可以连接到服务器.API 密钥已正确启用,请与支持人员一起检查.
但是 client.auth.get_authorize_url() 返回空参数而 auth.get_request_token() 返回 (null,null).有什么问题?如何启用日志记录以检查所有卡在何处?
the upwork library seems installed correctly, the .pem file is also loaded correctly and I think I can connect to the server.
The API keys are correctly enabled, checked with the support.
However client.auth.get_authorize_url() returns empty parameters and auth.get_request_token() returns (null,null).
What can be wrong? How do I enable logging to check where all gets stuck?
client.auth.get_authorize_url() returns:
"https://www.upwork.com/services/api/auth?oauth_token=None"
client.auth.auth.get_request_token() returns:
(None, None)
我使用的是 python 3.6
I am using python 3.6
推荐答案
不幸的是,这是在使用 Python3 时可能发生的已知"问题 - README 说:这些是 Python(2 和 3,是"支持"通过非官方 PR #27 并且不保证)Upwork 公共 API 的绑定".
Unfortunately, this is a "known" issue that may happen when Python3 is in use - README says: "These are Python (2, and 3 which is "supported" via unofficial PR #27 and not guaranteed) bindings for Upwork Public API".
你能不能试试 Python 2.x
Could you please try with Python 2.x
这篇关于upwork-api client.auth.get_request_token() 返回(空,空)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!