1ap / google-api-python-client

Automatically exported from code.google.com/p/google-api-python-client
Other
0 stars 0 forks source link

Add FusionTables support #157

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I'm trying to access Fusion Tables via this client from server application and 
faced

Traceback (most recent call last):
  File "/Users/ddushkin/Programming/eclipse/plugins/org.python.pydev_2.6.0.2012052102/pysrc/pydevd.py", line 1392, in <module>
    debugger.run(setup['file'], None, None)
  File "/Users/ddushkin/Programming/eclipse/plugins/org.python.pydev_2.6.0.2012052102/pysrc/pydevd.py", line 1085, in run
    pydev_imports.execfile(file, globals, locals) #execute the script
  File "/Users/ddushkin/Documents/workspaces/eclipse/eco_map/tryGAPI.py", line 26, in <module>
    service = build("fusiontables", "v1", http=http)
  File "/Library/Python/2.7/site-packages/google_api_python_client-1.0c1-py2.7.egg/apiclient/discovery.py", line 191, in build
    resp, content = http.request(requested_url)
  File "/Library/Python/2.7/site-packages/google_api_python_client-1.0c1-py2.7.egg/oauth2client/client.py", line 402, in new_request
    self._refresh(request_orig)
  File "/Library/Python/2.7/site-packages/google_api_python_client-1.0c1-py2.7.egg/oauth2client/client.py", line 569, in _refresh
    self._do_refresh_request(http_request)
  File "/Library/Python/2.7/site-packages/google_api_python_client-1.0c1-py2.7.egg/oauth2client/client.py", line 625, in _do_refresh_request
    raise AccessTokenRefreshError(error_msg)
oauth2client.client.AccessTokenRefreshError: invalid_grant

error.

I've done all steps from tasks.py example, nothing helps.

What version of the product are you using? On what operating system?
1.0c1 via easy_install on MacOS Lion.

Thank you for your work!

Original issue reported on code.google.com by legato...@gmail.com on 20 Jun 2012 at 5:47

GoogleCodeExporter commented 8 years ago
"invalid_grant" means that you have a mismatch in how you set up the OAuth 2.0 
client id, client secret, or redirect uri. Also make sure you have turned on 
the Fusion Tables API in the APIs Console, and that you are using the correct 
scope for accessing Fusion Tables.

Original comment by jcgregorio@google.com on 20 Jun 2012 at 5:59

GoogleCodeExporter commented 8 years ago
Ops, seems like Google's oauth system has a lag between adding new key and 
letting it being used. It's okay now.

Sorry for bothering you.

Original comment by legato...@gmail.com on 20 Jun 2012 at 7:19

GoogleCodeExporter commented 8 years ago
No problem.

Original comment by jcgregorio@google.com on 20 Jun 2012 at 7:38