Was this article helpful?
Thanks for your feedback
The YouTube extension lets you fetch YouTube videos from your account and display them on your entry page. So when you create an entry, you can select only one of the listed videos at a time as the input for that field, and the details of the video will be saved in JSON format in Contentstack.
This step-by-step guide explains how to create a YouTube custom field extension for your content types in Contentstack.
In order to set up this extension, you will need the API key of your YouTube account. Refer to this video to learn how to get your YouTube account’s API key.
Note down the API Key, as you will need it while configuring this extension in Contentstack (more details in Step 3).
While configuring the extension (in Step 3), you will also need to specify the ID of the channel of which you want to fetch and display the videos.
Note: You can display videos of any public channels. They don’t have to necessarily be yours.
Each YouTube channel has a unique ID. Let’s understand how to get this ID:
{ "api_key": "x82XXXXXrtMMMMMMMMMMMmf4GmCCCCCCCCC", "channel_id": "cadUC8TXXVWEFWEFdef-nuSDFSFDSuWAads" }
Save the custom field.
Once you have added a custom field, you can use it in your content type like any other field. To add a custom field in your content type, perform the following steps:
Create a content type and add the Custom field to it.
Under Select Extension, select the “Youtube” field that you created and set the other properties. You can add other fields as per requirements.
Additional Resource: You can also refer to our other documents on custom video extensions such as Ooyala, Brightcove, and Vimeo.
Was this article helpful?
Thanks for your feedback