Попытка получить учетные данные Google OAuth, как указано в этом примере :
google-oauthlib-tool --client-secrets c:\temp\client_secret_NNNN.json \
--credentials c:\temp\credentials.json \
--scope https://www.googleapis.com/auth/assistant-sdk-prototype \
--save
Но при вызове этой команды файл credentials.json
не создается.Любые предложения?
client_secret_NNNN.json:
{
"installed": {
"client_id": "NNNN.apps.googleusercontent.com",
"project_id": "personal-stuff-54a54",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://accounts.google.com/o/oauth2/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"redirect_uris": [
"urn:ietf:wg:oauth:2.0:oob",
"http://localhost"
]
}
}
Журнал:
Please visit this URL to authorize this application: https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=633452378895-dg56psuf7er87nh1ehmoluekkkv0qj0j.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2F&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fassistant-sdk-prototype&state=6vqzd8wqETrkbsAwSVbvlrFKcJ4Vs8&access_type=offline
Traceback (most recent call last):
File "c:\users\konopko\appdata\local\programs\python\python36-32\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\konopko\appdata\local\programs\python\python36-32\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\konopko\AppData\Local\Programs\Python\Python36-32\Scripts\google-oauthlib-tool.exe\__main__.py", line 9, in <module>
File "c:\users\konopko\appdata\local\programs\python\python36-32\lib\site-packages\click\core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "c:\users\konopko\appdata\local\programs\python\python36-32\lib\site-packages\click\core.py", line 697, in main
rv = self.invoke(ctx)
File "c:\users\konopko\appdata\local\programs\python\python36-32\lib\site-packages\click\core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\users\konopko\appdata\local\programs\python\python36-32\lib\site-packages\click\core.py", line 535, in invoke
return callback(*args, **kwargs)
File "c:\users\konopko\appdata\local\programs\python\python36-32\lib\site-packages\google_auth_oauthlib\tool\__main__.py", line 104, in main
creds = flow.run_local_server()
File "c:\users\konopko\appdata\local\programs\python\python36-32\lib\site-packages\google_auth_oauthlib\flow.py", line 420, in run_local_server
self.fetch_token(authorization_response=authorization_response)
File "c:\users\konopko\appdata\local\programs\python\python36-32\lib\site-packages\google_auth_oauthlib\flow.py", line 239, in fetch_token
kwargs.setdefault('client_secret', self.client_config['client_secret'])
KeyError: 'client_secret'