vinitkumar / googlecl

GoogleCL rewrite in __progress__
Other
325 stars 48 forks source link

problems with Youtube and having two different account usernames with google and youtube (interlinked accounts) googlecl-0.9.8 #221

Closed vinitkumar closed 6 years ago

vinitkumar commented 10 years ago

From hazno...@gmail.com on July 07, 2010 14:00:24

I wanted to upload a video to Youtube but...

  1. I have a google account with an email as a username
  2. my Youtube username is different but the Youtube account is linked to my google account

Now when I do youtube post --category Education somekillervideo.avi I get the request to type the user and I type in my Youtube username. my browser pops out a link in which I can only type the google account user. Then I have a screen asking me to grant access to googlecl.

After accepting I go back to the terminal and hit enter and I get this

You specified account "Youtubeuser" but granted access for "my@email.com"

Obviously, I am not able to type the youtube user in the google account login.

To this, if I type the email address in googlecl I use to login into my google account I get this error on the page that pops out

"Erreur du serveur

Vous venez d'accéder à la page de connexion d'un domaine qui ne fait pas appel à Google Apps. Veuillez vérifier l'adresse Web et réessayer."

the answer is in French since I use french as my main language but in short it says (Server error, you have accessed a page that is not using google apps. please verrify the address and try again.) What steps will reproduce the problem? 1. 2. 3. What is the expected output? What do you see instead? What version of the product are you using? On what operating system? What version of gdata-python-client (aka python-gdata)? Please provide any additional information below.

Original issue: http://code.google.com/p/googlecl/issues/detail?id=213

vinitkumar commented 10 years ago

From tom.h.mi...@gmail.com on July 12, 2010 13:58:09

Very weird. So the YouTube account is tied to your Apps account, not a regular Google / gmail account?

Could you apply the attached patch and try to post a video to youtube after logging on / authorizing with your email address? Please save the output to a file and post it back here ($ google youtube ... > yt_output.txt)

Thanks!

vinitkumar commented 10 years ago

From sjoub...@gmail.com on July 18, 2010 23:14:52

I'm also having this problem. I opened a Youtube account (e.g. FakeGroup) to post videos for another group, and had to create a google account around an email address created in the group's website's domain (e.g. youtube@fakegroup.org). When I try googlecl and specify the youtube username (FakeGroup), the google authorization page prints the Google Account name (youtube@fakegroup.org). After authorization, googlecl complains about the username mismatch (requested for FakeGroup, authorized youtube@fakegroup.org instead). When specifying the Google Account name in googlecl, Google Apps complains that Apps haven't been setup for the domain (fakegroup.org). I hope there's a way around this.

vinitkumar commented 10 years ago

From tom.h.mi...@gmail.com on July 30, 2010 09:48:21

I just got access to an Apps account, but I haven't been able to duplicate either message. Here are the steps I follow, using googlecl 0.9.9 and gdata-python 2.0.10:

Create a new YouTube account On the page asking if I already have a Google Account, enter my Apps email (myname@domain.com) into the "No. I need a new YouTube | Google Account" and create a password. Trying to use the "Yes. Add YouTube to my Google Account" box failed. Verify account via link sent to myname@domain.com Log out of myname@domain.com $ google youtube list -u myname@domain.com Get prompted with login for domain.com, enter credentials Stop with error page:

"The page you have requested cannot be displayed. Another site was requesting access to your AUDIOis account, but sent a malformed request. Please contact the site that you were trying to use when you received this message to inform them of the error. A detailed error message follows:

The "scope" parameter was bad or missing."

You should not be able to use the YouTube username with the -u option, but an Apps account should work. What version of gdata are you using?

Status: Feedback

vinitkumar commented 10 years ago

From sjoub...@gmail.com on July 30, 2010 10:40:35

I found a (temporary) solution. Use the Google Account username (youtube@fakegroup.org from the previous example) in GoogleCL, then wait for the webpage to load. It will have the same GoogleApps error. Go back to Terminal (on a Mac, for instance) and copy the OAuth URL provided there, leaving off the last part (i think it's a fragment like #dn or #dc or something). Paste the truncated URL in your browser and complete the authentication process. Youtube is now working for me, though I'm now getting timeout "Unknown Authorization Header" errors, and I had to apply the "max_results" fix for "list".

vinitkumar commented 10 years ago

_From c_k...@gmx.de on August 06, 2010 14:37:17_

The workaround does not work for me.

I specified my eMail adress as username. Then I copied the URL from the terminal and removed everything since "&hd=".

After grating access and hitting Enter in the terminal I get this error: Failed to get entries: {'status': 400, 'body': 'Missing or invalid username.', 'reason': 'Bad Request'}

vinitkumar commented 10 years ago

From tom.h.mi...@gmail.com on August 07, 2010 20:29:51

c_korn, are you using googlecl-0.9.9? You might be having the same problem as Issue 242 . Use --owner to specify the YouTube username whose videos you want to list (or apply the patch in that issue).

sjoubani, are those "Unknown Authorization Header" errors occurring with each command, or only some of the time?

vinitkumar commented 10 years ago

From sjoub...@gmail.com on August 08, 2010 10:04:20

I believe it's GoogleCL Issue 169 , gdata-python-client Issue 408 .

vinitkumar commented 10 years ago

From anthony....@gmail.com on August 09, 2010 09:12:42

same problem as the first post for me, my youtube and google account names are different however the two accounts are linked. I don't really want to create a new youtube account just for googlecl...

vinitkumar commented 10 years ago

_From c_k...@gmx.de on August 09, 2010 13:40:49_

Yes, I use version 0.9.9 (note that the patch in Issue 242 was applied in the repositoriy after the 0.9.9 release).

With the patch applied I don't see the "Failed to get entries: {'status': 400, 'body': 'Missing or invalid username.', 'reason': 'Bad Request'}" any longer but now there is just no output: google youtube list RoseOfTheOcean

This outputs nothing. google youtube list --owner RoseOfTheOcean This works however.

vinitkumar commented 10 years ago

From kaip...@gmail.com on October 14, 2010 00:43:09

to login to a googlecl service with different username / e-mail address use:

google list --user

vinitkumar commented 10 years ago

From tom.h.mi...@gmail.com on October 14, 2010 09:07:04

Anthony and c_korn, I'm sorry I missed your comments before. I must have missed the update email for this thread.

If your YouTube account is linked to a Google account, you'll want to use

google youtube --user

as kaipitu said, and that should work. To avoid specifying --user every time, you can add it to your config file (see ConfigurationOptions in the wiki)

the --owner flag, on the other hand, takes a YouTube account name, hence --owner RoseOfTheOcean working.

as of 0.9.11, if you have an extra argument on the command line without an option attached to it, it will be interpreted as the name of the video you want to list. So

google youtube list RoseOfTheOcean

will list all videos you own with a title that starts with "RoseOfTheOcean"

The ExampleScripts page has been overhauled to include many more examples.

I still haven't found an answer for having trouble with YouTube accounts linked to Google Apps accounts. YouTube accounts linked to regular Google accounts should work fine.

vinitkumar commented 10 years ago

_From c_k...@gmx.de on October 22, 2010 14:50:19_

Ok, so I just did the following: google youtube list RoseOfTheOcean --user It prints an URL in the terminal and opens an URL in my browser which fails to load. Then I delete everything after the &hd in the printed URL and open it. After granting the app access the following commands work: google youtube list RoseOfTheOcean google youtube list --owner RoseOfTheOcean

vinitkumar commented 10 years ago

From thmil...@google.com on October 22, 2010 14:57:44

Progress! Could you give me the following information?

Thanks a lot!

vinitkumar commented 10 years ago

_From c_k...@gmx.de on October 22, 2010 15:20:41_

gogglecl now recognizes my user as being registered. How can I undo this?

I think I have a regular google account. I just registered using my email address.

googlecl: 0.9.11 python-gdata: 2.0.8

vinitkumar commented 10 years ago

From thmil...@google.com on October 22, 2010 15:24:12

Pass --force-auth and --verbose on the command line. --force-auth will redo the authentication process, and --verbose will tell you what username is used.

vinitkumar commented 10 years ago

From tom.h.mi...@gmail.com on October 22, 2010 15:42:32

Thanks a lot. Have you had similar problems with any other GoogleCL services, like docs or picasa commands?

vinitkumar commented 10 years ago

From jens%mnml.dk@gtempaccount.com on November 01, 2010 04:09:41

I experience the same problem, I’m specifically using the picasa list function. But in general, I can’t ac-cess any functions. I have testet googlecl with a regular gmail account, which gives me no problems.

I get "The "scope" parameter was bad or missing." as described above.

vinitkumar commented 10 years ago

From thmil...@google.com on November 01, 2010 12:22:29

jensholmpic -- can you remove the "$hd=mnml.dk" at the end of that URL, and see if that fixes the problem? Thanks.

vinitkumar commented 10 years ago

From jens%mnml.dk@gtempaccount.com on November 03, 2010 13:20:10

@comment 20:

Already tried that, following one of the first posts, that did not fix the problem.

vinitkumar commented 10 years ago

From tom.h.mi...@gmail.com on November 10, 2010 11:20:38

Issue 326 has been merged into this issue.

vinitkumar commented 10 years ago

From d...@dtw.me.uk on November 24, 2010 09:53:22

I'm having the same problem with my apps account - (which also has a google account with the same name).

If I try a vanilla gmail account it works OK.

Is this likely to be a conflict between the two types of account?

vinitkumar commented 10 years ago

From d...@dtw.me.uk on November 24, 2010 15:20:10

OK, I managed to resolve the problem.

I logged out of both the google apps version of my account, and my google account.

Reran the command in Google CL, which directed me to a login page for me Google Apps account automatically. I ignored this, and copied the url that appears at the command line, but removed the HD parameter. I was then asked which account I'd like to use: the Google Apps one, or the Google Account. I picked the Google Account, and hey presto, it works.

vinitkumar commented 10 years ago

From optical3...@gtempaccount.com on February 20, 2011 10:12:28

i would like to add to danwools' solution.

log out of both accounts, get the url.

login to youtube, and then visit the url without the HD parameter.

works like a charm now

vinitkumar commented 10 years ago

From 41domash...@gmail.com on April 01, 2011 04:09:59

Same issue (GoogleCL 0.9.13). I have regular account (NOT tied to Apps) with email as username (user@example.com) and linked Youtube account (Tubeuser).

1) --user Tubeuser google youtube post video.avi --user Tubeuser

Please log in and/or grant access via your browser at https://www.google.com/accounts/OAuthAuthorizeToken?oauth_token=4%2FUmkr3WSSz6oGb7sjrV4vW2y_rABp&hd=default then hit enter. You specified account Tubeuser but granted access for user@example.com. Please log out of pishitepisma@studio-41.com and grant access with Tubeuser.

2) --user user@example.com google youtube post video.avi --user user@example.com --owner Tubeuser

redirects to https://www.google.com/a/example.com/ServiceLogin2?continue=https%3A%2F%2Fwww.google.com%2Fa%2Fexample.com%2FOAuthAuthorizeToken%3Foauth_token%3D4%252FXyh3OJTAHEWXR5alNtsCfX8v6rjv%26hd%3Dexample.com&passive=true&service=apps&btmpl=authsub with Server Error (no Apps account)

No URL tricks (like removing &hd=...) does not work because I cannot login to my Youtube account from https://www.google.com/accounts/.. .

vinitkumar commented 10 years ago

From lenTca...@aol.com on July 01, 2012 08:59:41

my too two account two email and since glooogle changed the been lick together and the sould not have