upwork-api client.auth.get_request_token() returns (null,null)

♀尐吖头ヾ 提交于 2020-02-23 04:15:51

问题


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")

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)  

I am using python 3.6


回答1:


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".

Could you please try with Python 2.x



来源:https://stackoverflow.com/questions/54960036/upwork-api-client-auth-get-request-token-returns-null-null

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!