Envio de vídeo para YouTube e Vimeo usando componente de tema

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 curtida

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 curtida

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 curtida

Olá!
Estou tentando fazer um upload no Youtube, mas recebi este erro de Javascript:

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

Mas, até onde sei, os cookies estão habilitados…

Você pode verificar se os cookies de terceiros foram desativados? Você tem isso na barra de endereço? image.png

1 curtida

Boa observação. Acredito que o Google desative cookies de terceiros por padrão, mas posso estar enganado…

Agora tenho outro erro:

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

Os acessos estão corretos, no entanto:

Segui estes passos no processo de upload do vídeo através da interface do Discourse:

Você obteve o token? Você tem que se autenticar primeiro com o Google e obter um token, parece que você não tem isso.

1 curtida

Você quis dizer o ID do cliente?

Eu o defini nas configurações do componente de tema:


Editar: não consegui fazer o upload do Vimeo funcionar também.

É estranho porque não tive problemas com Youtube e Vimeo da última vez que testei seu componente de tema. :confused:

Mensagem de erro:

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

1 curtida

o que usamos Vimeo para vídeos do Pinterest :movie_camera: :movie_camera: :movie_camera:

Alguém instalou e usou este componente de tema com sucesso recentemente?

Sim, eu uso com o Vimeo. :slightly_smiling_face:

Por acaso, você viu algum problema nas minhas capturas de tela? Estou um pouco frustrado por não conseguir descobrir como fazer este componente de tema funcionar quando antes eu conseguia. :face_with_raised_eyebrow:

1 curtida

Olá,

Eu não tentei configurar a versão do YouTube, mas com o Vimeo, segui o vídeo do OP.

Selecione (acho que este pode ser o seu problema) na página de geração de token de acesso a opção Autenticado (você) e em Escopos selecione Público (obrigatório), Privado e Upload

então clique em Gerar e copie a chave para vimeo api access token nas configurações do Discourse.

2 curtidas

Olá,

Estou tentando implementar o upload do YouTube. Todos os processos que segui conforme sugerido ainda não estão funcionando, ficando presos apenas na autenticação.

Ou existe algum plugin alternativo para fazer upload de qualquer arquivo para a comunidade?

1 curtida

“para fazer upload de qualquer arquivo para a comunidade”, stricto sensu, você só precisa alterar a configuração extensões autorizadas para qualquer extensão.
Mas você será limitado pelo tamanho máximo do anexo, que você pode aumentar, embora o Discourse não seja feito para ser um serviço de hospedagem de arquivos, e eu vi pessoas tendo problemas com arquivos muito grandes, embora as configurações estivessem corretas.

Mas suponho que o que você realmente quer é uma maneira fácil para seus usuários exibirem seus próprios vídeos no Discourse.

Até onde eu sei, não há outro plugin ou componente de tema além deste, e se você não conseguir configurá-lo por qualquer motivo, seus usuários só poderão contar com soluções externas compatíveis com o Discourse (no sentido em que a mídia pode ser exibida em uma postagem do Discourse), como fazer upload para Youtube, Vimeo ou qualquer outro serviço especializado ou em nuvem.

3 curtidas

Existe alguma chance de isso vir a suportar upload no chat?

Não da minha parte, se alguém quiser adicionar esse suporte, será bem-vindo para contribuir com um PR.

2 curtidas

Olá @Canapin
Você resolveu este problema com o Youtube?
Eu tenho exatamente o mesmo problema…
Obrigado!

1 curtida