Hello, Magento Buddies!
Want to make the product in your Magento 2 store look more alluring and active? Well, I’ve got you covered. Magento 2 provides this functionality to individually upload the video to a product.
More visual appealing product = more sales generated
Using the YouTube API key, you can display or set your youtube video for a product to be shown in the product image/gallery section.
Let’s get right into the steps to Add Product Videos in Magento 2 – Guide for Youtube API Key.
Steps to Add Product Videos in Magento 2
Step 1: Get Your YouTube API Key
Firstly, sign in to your Google account. Navigate to the Google Developers Console. And, perform the following:
- Search for youtube API & Select Youtube Data API v3.
- Click on Enable.
- From the left-hand side panel, click on the Credentials → Create credentials → API key.
- You will see an API key generated in a popup. Copy the key and store it in a safe place, we need to use it in the Magento backend.
If you want to restrict the access to this API by IP or something, click on Restrict key otherwise click on close to close the popup. By the way, restricting keys is a good option to prevent unauthorized use and quota theft. You can restrict it by websites, IP addresses, or applications can use your API key
Step 2: Configure YouTube API in Magento Backend
- Log in to the Magento backend and go to Stores → Settings → Configuration.
- From the Catalog tab, select Catalog.
- Expand the Product Video section and paste the key in the YouTube API Key field.
- Save the configuration and navigate to Cache Management to refresh the cache.
Step 3: Upload Video on Product
- In the admin panel, Go to Catalog – Products
- Select and Edit the product
- Expand the images and videos section and click on Add Video. Upload product video.
Enter the video URL, its title, description, preview image, and the role. On filling out all the information, hit the save button. You can go to the frontend now and check how the video shows.
Wrap Up!
So, that was all about the steps to Add Product Videos in Magento 2 – Guide for Youtube API Key. Lastly, if you had any problem while implementing these methods or need any help with your Magento store, then you can contact our Support Desk. We will be happy to help you.
Happy Reading!