salimoha / googlecl

Automatically exported from code.google.com/p/googlecl
0 stars 0 forks source link

Can't restore access after revoke #401

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run 'google'
2. 'docs list'
3. Grant GoogleCL access through token
4. Revoke GoogleCL access through Account Settings
5. 'docs list' again
6. GoogleCL says Unauthorized access

What is the expected output? What do you see instead?
I'm expecting GoogleCL to request access token again.
I'm seeing:
> docs list
Traceback (most recent call last):
  File "/usr/local/bin/google", line 488, in run_interactive
    run_once(options, args)
  File "/usr/local/bin/google", line 627, in run_once
    task.run(client, options, args)
  File "/usr/local/lib/python2.6/dist-packages/googlecl/docs/__init__.py", line 145, in _run_list
    entries = client.get_doclist(titles_list, folder_entries)
  File "/usr/local/lib/python2.6/dist-packages/googlecl/docs/client.py", line 176, in get_doclist
    desired_class=gdata.docs.data.DocList)
  File "/usr/local/lib/python2.6/dist-packages/googlecl/base.py", line 215, in get_entries
    desired_class=desired_class)
  File "/usr/local/lib/python2.6/dist-packages/gdata/client.py", line 635, in get_feed
    **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/googlecl/client.py", line 60, in retry_request
    return self.retry_operation(*args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/googlecl/base.py", line 387, in retry_operation
    raise unexpected
Unauthorized: Unauthorized - Server responded with: 401, <HTML>
<HEAD>
<TITLE>Token invalid - Invalid AuthSub token.</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Token invalid - Invalid AuthSub token.</H1>
<H2>Error 401</H2>
</BODY>
</HTML>

>

What version of the product are you using? On what operating system? What
version of gdata-python-client (aka python-gdata)?
google 0.9.13 on BackTrack 5 with gdata-2.0.14

Is there a way to restore the access of GoogleCL?

Thanks

Original issue reported on code.google.com by q8mos...@gmail.com on 27 Jun 2011 at 10:23

GoogleCodeExporter commented 9 years ago
Currently, it's no easy way to restore (reset) as far as I know.

The easier way is to delete access token file, which can be found at 
~/.local/share/googlecl/access_tok_email@example.com. BUT it contains all 
access tokens of email@example.com, once you delete it, you will need to 
re-authorize other services as well.

I also open a new Issue 413 for handling this kind of issue.

Original comment by livibet...@gmail.com on 7 Aug 2011 at 10:12

GoogleCodeExporter commented 9 years ago
The above solution does not work for me, nor does --force-auth.

Here is my situation:

1) Tried 'google contacts ..' and had to use the 'url copy/remove hd=..' to get 
access, then I was able to list contacts
2) Tried 'google calendar ..' and tried the same 'url copy/remove hd param' but 
was unable to get access.
3) Tried revoking the googlecl access in my account on google
4) Was unable to authorize calendar and contacts now would of course give me 
the 'token revoked' message
5) Tried --force-auth for contacts and it didn't work.  It claimed to have 
added the authorization to my account, but the googlecl command didn't work and 
it still wouldn't show googlecl in the authorized access to my account.
6) Tried removing the .local access token file and reauth, same problem, still 
wouldn't work and still wouldn't show up in my account.

I do not have a gmail account, just google apps (calendar, docs, contacts, 
etc..)

I would love to have CLI access to google, very much.

Original comment by google....@daveola.com on 16 Jul 2012 at 1:14