Publishing to YouTube | Community
Skip to main content
TheBigRed
Level 4
January 11, 2016
Solved

Publishing to YouTube

  • January 11, 2016
  • 8 replies
  • 4349 views

Re: https://docs.adobe.com/docs/en/aem/6-1/author/assets/dynamic-media/video.html#Publishing%20videos%20to%20YouTube

Is there a way to push videos to YouTube channels without setting up an Google Cloud Account.

Why I'm asking because it's extra cost.

Another article said you can push through Dynamic Media Cloud.

Any help on this please?

 

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

You can use YouTube Java API and build a custom AEM service that can integrate with YouTube. As i state a lot - one of the most powerful things about AEM is its ability to use 3rd party APIs to build custom services. See these Google docs for more information: 

https://developers.google.com/youtube/v3/code_samples/java?hl=en

8 replies

smacdonald2008
smacdonald2008Accepted solution
Level 10
January 11, 2016

You can use YouTube Java API and build a custom AEM service that can integrate with YouTube. As i state a lot - one of the most powerful things about AEM is its ability to use 3rd party APIs to build custom services. See these Google docs for more information: 

https://developers.google.com/youtube/v3/code_samples/java?hl=en

Adobe Employee
August 7, 2020

Hi Scott, I followed the API steps on AEM and tried. My Java code works fine but I am kind of getting stuck on AEM. So in the last part of the code 
"

new AuthorizationCodeInstalledApp(flow, localReceiver).authorize("user");

the code just keeps waiting. Any pointers will help. 

TheBigRed
TheBigRedAuthor
Level 4
January 11, 2016

smacdonald2008 wrote...

You can use YouTube Java API and build a custom AEM service that can integrate with YouTube. As i state a lot - one of the most powerful things about AEM is its ability to use 3rd party APIs to build custom services. See this Google docs for more information: 

https://developers.google.com/youtube/v3/code_samples/java?hl=en

 

 


Thank you very much Scott!

Jitendra_S_Toma
Level 10
January 12, 2016

While using the YouTube API to achieve your goal, you might be needing some help on how to integrate third party libraries (Not bundles) in your project.

http://www.cqblueprints.com/tipsandtricks/build-and-deploy-osgi/deploy-third-party-libs.html

Jitendra

TheBigRed wrote...

Re: https://docs.adobe.com/docs/en/aem/6-1/author/assets/dynamic-media/video.html#Publishing%20videos%20to%20YouTube

Is there a way to push videos to YouTube channels without setting up an Google Cloud Account.

Why I'm asking because it's extra cost.

Another article said you can push through Dynamic Media Cloud.

Any help on this please?

 

Thanks

 

kautuk_sahni
Community Manager
Community Manager
January 12, 2016

Hi

Adding to what Scott and Jitendra has provided:

Getting Started:- https://developers.google.com/youtube/2.0/developers_guide_java?hl=en#Getting_Started

//First step is to do Authentication :- The Java client library can be used to retrieve public feeds or to execute authenticated operations. All public feeds are read-only and do not require any authentication. Authenticated operations, on the other hand, include the retrieval of private feeds as well as write, upload, update and delete operations. You will need to sign up for a developer key to be able to execute authenticated operations.

101 for YouTube API :- Step by setp explained :- http://www.javacodegeeks.com/2010/05/getting-started-with-youtube-java-api.html

Example code :- https://developers.google.com/youtube/v3/code_samples/java

I hope this would help you.

Thanks and Regards

Kautuk Sahni

Kautuk Sahni
TheBigRed
TheBigRedAuthor
Level 4
January 13, 2016

So my team has decided to change course. We configured everything following this article:

https://docs.adobe.com/docs/en/aem/6-1/author/assets/dynamic-media/video.html#Publishing%20videos%20to%20YouTube

However nothing is getting published. We are on 6.1, Google cloud platform is set up and configuration file in AEM is also set up with correct credentials.

When I click publish nothing gets uploaded to YouTube. Where can I confirm or check for errors regarding this. Nothing seems

to be popping up in the error logs.

 

Thanks!

smacdonald2008
Level 10
January 13, 2016

Did you follow the entire doc and nothing happened at all. Did you follow all steps. Did you explore the possibility of writing your own service using Google APIs? 

smacdonald2008
Level 10
January 14, 2016

I am looking into the Dev Google Code. Here is the latest Google API code from GitHub:

https://github.com/youtube/api-samples/blob/master/java/src/main/java/com/google/api/services/samples/youtube/cmdline/data/UploadVideo.java

If you decided to go custom service route - this is the code to use - appears version 2 is deprecated. 

WIth respect to the doc - I am not sure if the Google Cloud service has a bug. If you followed the docs and it does nto work - seems to be a bug somewhere. 

I will ask support to look tomorrow to see if there are any known issues. 

TheBigRed
TheBigRedAuthor
Level 4
January 14, 2016

smacdonald2008 wrote...

I am looking into the Dev Google Code. Here is the latest Google API code from GitHub:

https://github.com/youtube/api-samples/blob/master/java/src/main/java/com/google/api/services/samples/youtube/cmdline/data/UploadVideo.java

If you decided to go custom service route - this is the code to use - appears version 2 is deprecated. 

WIth respect to the doc - I am not sure if the Google Cloud service has a bug. If you followed the docs and it does nto work - seems to be a bug somewhere. 

I will ask support to look tomorrow to see if there are any known issues. 

 


I think the issue is our AEM server is non-public. According to step 17 it won't validate

https://docs.adobe.com/docs/en/aem/6-1/author/assets/dynamic-media/video.html#Publishing%20videos%20to%20YouTube

I get this error when configuring the YouTube setup:

 

400. That’s an error.

 

Error: invalid_request

Invalid parameter value for redirect_uri: Non-public domains not allowed: http://vmbdcl074:4502/etc/cloudservices/youtube.youtubecredentialcallback.json

 

How can you by pass this?