Video Upload to YouTube and Vimeo using Theme Component

I’m on this step

It’s asking me what scopes to select for OAuth. Out of the 34 available, which ones need to be selected?

Screenshot of the Update selected scopes screen

You should only need upload related permissions. These are the only ones required for the plugin, you can add anything you want though better not to unless you really need them.

1 Like

Thanks @ti0 !

Google is now asking us to do the following

  1. Answer: How will the scopes be used? Explain to Google why you need these scopes, how you will use them, and why more limited scopes aren’t sufficient.

  2. Demo video: how will the scopes will be used? A YouTube video link is required when selecting sensitive or restricted scopes. Your YouTube video should demonstrate the OAuth grant process by users and explain, in detail, how you’ll use sensitive and restricted scopes within the app’s functionality for each OAuth client belonging to the project. Learn more The video should clearly show the app’s details such as the app name, OAuth client ID, and so on.

Could we create a template answer that is then added to this documentation?

I’ll try my best with #1 and definitely need help with #2.

  1. Users of our app will be able to upload videos directly to their Youtube account via our online forum at hub.youthpowercoalition.org. We need to be able to view their YouTube account and manage their YouTube videos in order to upload the video. Users choose their desired privacy level.

What do you think?

This sounds a bit dangerous because you don’t actually need to be able to view their account. The permissions give the app the ability to list their existing videos and add new ones.
I think just mentioning the first line is sufficient, and additionally you can put:

The permissions will give users the ability to upload and embed videos directly within our private instance of the open source forum software called Discourse (htttps://discourse.org). The app uses plugins to enable different functionality, the open source plugin for uploading videos is listed here: Video Upload to YouTube and Vimeo using Theme Component

I think this should be sufficient for #1.
For #2 you can make a quick demo of the upload process or use this one :

1 Like

The language and video link you provided worked well, @ti0, thank you!

Here’s the next message I got from the Google Cloud Trust & Safety Team regarding consent.

We reviewed your project and found that your privacy policy Privacy - Youth Power Hub doesn’t meet our requirements for the Google API Service: User Data Policy. If you want to continue with the verification process, please make sure the privacy policy linked to your project follows these requirements:

Privacy Policy Requirements

  • The URL in your project points to a privacy policy on a publicly accessible domain.
  • The privacy policy is hosted and accessible in the domain of your website.
  • The privacy policy is accessible from the app’s home page.
  • Users can view the privacy policy.
  • The privacy policy clearly describes the way your application accesses, uses, stores, or shares Google user data.
  • The privacy policy is linked to the OAuth Consent Screen on the Google API Console.
  • You only use Google user data in the ways described in your published privacy policy.

Limited Use Requirements

If your app uses restricted scopes, we’ll check that your privacy policy follows our Limited Use requirements.

You can find more information in the OAuth Application Verification FAQ.

Is there recommended language for the privacy policy?

1 Like

Hi!
I’m trying a Youtube upload, but I got this javascript error:

Uncaught {error: 'idpiframe_initialization_failed', details: 'Cookies are not enabled in current environment.'}

But as far as I know, cookies are enabled…

Can you check if third-party cookies have been disabled? Do you have this in your address bar? image.png

1 Like

Good catch. I believe google deactivate third-party cookies by default, but I could be wrong…

I now have another error:

POST https://www.googleapis.com/upload/youtube/v3/videos?part=snippet%2Cstatus&uploadType=resumable 401
Unauthorized

Accesses are right though:

I went with these steps in the process of uploading the video through the Discourse interface:

Did you get the token? You have to first auth with google and get a token, looks like you don’t have that.

1 Like

Did you mean the Client ID?

I do have set it in the theme component settings:


Edit: couldn’t have Vimeo upload working either.

It’s weird because I had no trouble with both Youtube and Vimeo the last time I tried your theme component. :confused:

Error message:

POST https://api.vimeo.com/me/videos 401 (Unauthorized)

1 Like

what we use Vimeo for Pinterest videos :movie_camera: :movie_camera: :movie_camera:

Has anyone successfully installed and used this theme component recently?

Yes, I use it with Vimeo. :slightly_smiling_face:

By chance, did you see any issue in my screenshots? I’m a bit frustrated that I couldn’t figure out how to have this theme component working when I was able before. :face_with_raised_eyebrow:

1 Like

Hello,

I did not try to set up the YouTube version but with Vimeo I followed the video from the OP.

Select (I think this might be your problem) on generate an access token page the Authenticated (you) option and on Scopes select Public (required), Private and Upload

than click Generate and copy the key to vimeo api access token on Discourse setting.

2 Likes

Hi,

I am trying to implement the youtube upload. All the processes I have followed as suggested but still not working are getting stuck by showing authentication only.

Or is there any alternative plugin to upload any file to community?

1 Like

“to upload any file to community”, stricto sensu, you just have to change the setting authorized extensions to any extension.
But you will be limited by the max attachment size, which you can increase, though Discourse isn’t meant to be a file hosting service, and I saw people having trouble with very large files though the settings were correct.

But I suppose what you really want is an easy way for your users to display their own videos in Discourse.

As far as I know, there is no other plugin or theme component than this one, and if you can’t set it up for whatever reason, your users then can only rely on external, Discourse-compatible solutions (in the sense where the media can be oneboxed on a Discourse post), like uploading to Youtube, Vimeo or any other specialized or cloud service.

2 Likes

Any chance this will ever support upload in chat?

Not from my side, if someone wants to add that support they are welcome to contribute a PR.

2 Likes

Hi @Canapin
Have you solved this issue with Youtube?
I have exactly the same problem…
Thank you!

1 Like