Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate your OAuth out-of-band flow to an alternative method before Oct. 3, 2022 #352

Open
feacluster opened this issue Jul 14, 2022 · 5 comments

Comments

@feacluster
Copy link

feacluster commented Jul 14, 2022

Got the very confusing email from Google a few months ago but have been dragging my feet on following it. So I tried today to create a new credentials as type "Desktop" in the same project. But when I try and upload the YouTube video, I get this:

It does not make sense as my .client_secrets.json file does not have any oob in it ( although the old one did ).

Capture

@feacluster
Copy link
Author

feacluster commented Jul 14, 2022

So I've tried putting my own flow.redirect_uri in init.py as followed:

#    flow.redirect_uri =  "https://mysite.com"

But when I try and upload a video , google give me this error:

Authorization Error
Error 400: redirect_uri_mismatch

I also tried editing the .client_secret.json file with the same redirect_uri, but same error. The default is http://localhost or something..

Ready to pull my hair out ! I don't understand why google makes this so complicated. What does OOB even mean?? I know out of band , but what does it really mean? Doubt even the engineers at google know...

@feacluster
Copy link
Author

feacluster commented Jul 14, 2022

Think I finally figured it out ( although not 100% sure this is kosher with Google ):

When creating your OAuth credential, I selected "Web application" and put in "https://mysite.com" for the authorized redirect_uri . Next I went to init.py and put in the same site for "flow.redirect_uri". Last, I deleted the .youtube-upload-credentials.json and tried to upload a new video. It then asked me to put the link in the browser. After doing so, it took me back to https://mysite.com, however, in the URL I could see the code. I copied this code and pasted it back into youtube-upload script and it worked..

Maybe this method is still deprecated/unsupported. Hopefully others can try and report back!

@carlosnewmusic
Copy link

I get this error with the correct google credentials. https://pastebin.com/myAsGApL

@moneyforsomething
Copy link

@feacluster - Did you manage to resolve this issue?

@AkitaAttribute
Copy link

@feacluster this worked for me, however to save everyone a step, you can leave your app as "Desktop App" and just change the line of code flow.redirect_uri = oauth2client.client.OOB_CALLBACK_URN to flow.redirect_uri = "http://localhost:8080". It'll take you to a broken page, but the code for your consent screen is in the URL. It may be encoded if it contains characters that need to be escaped, so you should paste it into something like http://www.asiteaboutnothing.net/c_decode-url.html this if you don't want to spend the effort re-learning the escape characters like I did.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants