我已按照此处的所有说明进行操作:https ://developers.google.com/bigquery/bigquery-api-quickstart
但一直无法使授权过程正常工作。即使我指定 urn: ietf:wg:oauth:2.0:oob 作为回调,生成的 URL 也会尝试 localhost。当我运行我的脚本时,我得到以下输出,网页打开,但从未提示我输入我的代码。我在这里做错了什么?我正在使用 API 快速入门页面底部的完整示例代码。
% python bqexample.py
WARNING:root:This function, oauth2client.tools.run(), and the use of the gflags library are deprecated and will be removed in a future version of the library.
Your browser has been opened to visit:
https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fbigquery&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2F&response_type=code&client_id=(REMOVED).apps.googleusercontent.com&access_type=offline
If your browser is on a different machine then exit and re-run
this application with the command-line parameter
--noauth_local_webserver