How to upload Youtube Videos as Product Videos in Magento 2? - HBWSL Magento2 Blog
Magento 2 Tutorials

How to upload Youtube Videos as Product Videos in Magento 2?

To upload Youtube videos as product videos in Magento 2, you need to follow three steps:

    • Step 1: Get your Youtube API key
    • Step 2: Configure Magento to use the Youtube API
    • Step 3: Link the video to product



Step 1: Get your YouTube API Key

Log in to your Google account, and visit the Google Developers Console. Then, follow these:

    • Click on YouTube Data APIYoutube Data API


    • Enable the API and Click on Credentials on left and choose API KeyChoose API key from credentials   After creation of API Key, copy it.


Step 2: Configure Magento 2

  • Open Admin Panel and go to Stores->Setting->Configuration
  • In the panel, under Catalog, choose Catalog
  • Expand the Product Video section, paste Youtube API key into the required field.Add Youtube API key to Product Video
  • Click Save Config
  • Go to the terminal where your Magento directory is present, and run:

    php bin/magento indexer:reindex

  • Go to Cache Management and Refresh Cache


Step 3: Linking Video

    • Go in Product->Catalog->Select the product
    • In product page, navigate to Add Images and VideosAdd product video


    • Click on Add VideoFill in details to Add Product Video


    • Fill the information and Click on Save, and your video will get add to that product pageSave to show preview


On Success:

Products Images and Videos


*Note: You should ENABLE API before using it, API is enabled by creating new project and then clicking ENABLE

Share this Story
Load More Related Articles
Load More By Editorial Staff
Load More In Magento 2 Tutorials

Leave a Reply

Check Also

How A/B Testing Using Humcommerce Can Increase Conversions on Your Magento Store

Magento is one of the most powerful e-commerce ...