0
我使用Python庫requests-oauthlib爲了創建一個應用程序,可以與一些主要提供商(谷歌,Dropbox,Facebook,Twitter)使用OAuth。
示例代碼提供here給我一個例外:
通過Python庫請求使用OAuth與谷歌 - oauthlib拋出異常MissingCodeError
raise MissingCodeError("Missing code parameter in response.")
oauthlib.oauth2.rfc6749.errors.MissingCodeError: Missing code parameter in response.
的問題是不是在說我與谷歌API控制檯創建網絡應用客戶端,因爲我寫的另一段代碼做同樣的事情,但使用Python庫google-api-python-client並且工作正常。
有什麼想法?
我實際上遇到同樣的錯誤...你能分享你的解決方案嗎?這是我遵循的例子:http://requests-oauthlib.readthedocs.org/en/latest/examples/github.html –
很久以前,我不記得所有細節。但我想redirect_response就像'http://googlewhatever.../?code = mycode'。如果'redirect_response ='http://googlewhatever.../?code = mycode'',那麼寫在答案中的第一段代碼就可以工作。如果'redirect_response ='mycode'' – nimiq
感謝您的回覆,第二段代碼就可以工作。你最終使用了哪個OAUTH庫? –