<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to allow specific YouTube channels in API / CLI Discussion</title>
    <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-allow-specific-YouTube-channels/m-p/132724#M6376</link>
    <description>&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="6" color="#FF00FF"&gt;&lt;A target="_blank" name="_Toc77203145"&gt;&lt;/A&gt;&lt;FONT color="#000000"&gt;How to allow specific YouTube channels&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Security Engineering Brazil&lt;/P&gt;
&lt;P&gt;July, 2021&lt;/P&gt;
&lt;P&gt;Versão 02&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Author:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Thiago Mourao, SE&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Revision:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Contents&lt;/P&gt;
&lt;P&gt;&lt;A href="#_Toc77203049" target="_blank" rel="noopener"&gt;How to allow specific YouTube channels &lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="#_Toc77203050" target="_blank" rel="noopener"&gt;Goal&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="#_Toc77203051" target="_blank" rel="noopener"&gt;Warning&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="#_Toc77203052" target="_blank" rel="noopener"&gt;Limitations and Requirements&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="#_Toc77203053" target="_blank" rel="noopener"&gt;Topology&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="#_Toc77203054" target="_blank" rel="noopener"&gt;Scripts&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="#_Toc77203055" target="_blank" rel="noopener"&gt;Step by step&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;A target="_blank" name="_Toc77203050"&gt;&lt;/A&gt;&lt;FONT size="5"&gt;Goal&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The purpose of the document is to describe the steps necessary to make a granular control of the YouTube channel in Check Point's NGFW, thus being possible to allow or block access to specific YouTube channels from their unique identifier.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;A target="_blank" name="_Toc77203051"&gt;&lt;/A&gt;&lt;FONT size="5"&gt;Warning&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The script used in this Proof of Concept was created by me (&lt;A href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/4755" target="_blank" rel="noopener"&gt;Thiago Mourão&lt;/A&gt;) using official reference documents from the API Management API Reference v1.8 (&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#introduction~v1.8%20" target="_blank" rel="noopener"&gt;link&lt;/A&gt;), for more details and updates to the API available through Check Point, please visit the &lt;EM&gt;Check Point API Reference&lt;/EM&gt; (&lt;A href="https://sc1.checkpoint.com/documents/latest/api_reference/index.html" target="_blank" rel="noopener"&gt;link&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;A target="_blank" name="_Toc77203052"&gt;&lt;/A&gt;&lt;FONT size="5"&gt;Limitations and Requirements&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;For this lab, version 1.8 of the Check Point management API was used, available from version R81.10 of the Gaia Operating System. For earlier versions, please refer to the corresponding version reference guide to ensure support for the commands used.&lt;/LI&gt;
&lt;LI&gt;To list videos from a YouTube channel, it was used in YouTube Data API v3 (&lt;A href="https://developers.google.com/youtube/v3" target="_blank" rel="noopener"&gt;link&lt;/A&gt;) and for that you will need to create your own key for this API.&lt;/LI&gt;
&lt;LI&gt;To do granular control of YouTube video URLs it will be necessary configure the HTTPS inspection (SSL Inspection) on the gateway&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;A target="_blank" name="_Toc77203053"&gt;&lt;/A&gt;&lt;FONT size="5"&gt;Topology&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;In this lab, we used an R81.10 version of Check Point Gaia defined as Security Gateway and Manager (StandAlone) at the same time and they were virtualized on VMware Workstation 16.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Virtual Environment:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;1 x Check Point StandAlone (Gateway/ Manager) R81.10&lt;/LI&gt;
&lt;LI&gt;1 x Microsoft Windows 10&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG style="font-family: inherit; background-color: #ffffff;"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12663i439ADAFC7E6DEEEC/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG style="font-family: inherit; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;A target="_blank" name="_Toc77203054"&gt;&lt;/A&gt;&lt;FONT size="5"&gt;Scripts&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG style="font-family: inherit; background-color: #ffffff;"&gt;ytcl_watch.sh&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This script performs the following steps:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Checks whether new YouTube channels have been considered for the “YouTubeChannels-AllowList” object in the format defined as YTCL-Channel_ID&lt;/LI&gt;
&lt;LI&gt;If a new channel has been added to the scripts “ytcl_diff.sh” and “ytcl_update.sh” it should be possible, in case there are no errors and the damaged channels have public videos.&lt;/LI&gt;
&lt;/UL&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="100%"&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;#!/bin/bash -f&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;source /var/opt/CPshrd-R81.10/tmp/.CPprofile.sh&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;#Script Directory&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;EXECDIR="/home/admin/ytcl"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;APIKEY=$(cat apikey)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;MGMTIP="192.168.157.100"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;cd $EXECDIR&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "#### Executing ytcl_watch.sh at $(date -u) ####"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "MGMT - Login"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;mgmt_cli login --management $MGMTIP api-key $APIKEY &amp;gt; sid_a.txt&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Erasing YouTubeChannels-AllowList.list file"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;&amp;gt; YouTubeChannels-AllowList.list&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Getting information from YouTubeChannels-AllowList Object and saving on file YouTubeChannels-AllowList.list"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;mgmt_cli --management $MGMTIP -s sid_a.txt show application-site-group name "YouTubeChannels-AllowList" --format json | jq '.members[] | select( .name | contains("YTCL"))' | jq '.name' | sort &amp;gt; YouTubeChannels-AllowList.list&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "MGMT - Logout"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;mgmt_cli --management $MGMTIP -s sid_a.txt logout --format json | jq -c '.'&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Erasing YouTubeChannels-AllowList.diff file"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;&amp;gt; YouTubeChannels-AllowList.diff&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Creating new YouTubeChannels-AllowList.diff file"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;diff &amp;lt;(sort YouTubeChannels-AllowList.list) &amp;lt;(sort YouTubeChannels-AllowList.list1) | grep "&amp;lt;" | sed 's/&amp;lt; //' &amp;gt; YouTubeChannels-AllowList.diff&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Checking YouTubeChannels-AllowList.diff file"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;if [[ $(cat YouTubeChannels-AllowList.diff | wc -l) -gt 0 ]]&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Running script $EXECDIR/ytcl_diff.sh to creating .url files"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;sh $EXECDIR/ytcl_diff.sh&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;else&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "No changes on YouTubeChannels-AllowList.list file"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;fi&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Copying file $EXECDIR/YouTubeChannels-AllowList.list to $EXECDIR/YouTubeChannels-AllowList.list1"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;cp -f $EXECDIR/YouTubeChannels-AllowList.list $EXECDIR/YouTubeChannels-AllowList.list1&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;if [[ $(sh -c 'ls *.url | grep YTCL' | wc -l) -gt 0 ]]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Running script $EXECDIR/ytcl_update.sh to Updating URLs on Group YouTubeChannels-AllowList"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;sh $EXECDIR/ytcl_update.sh&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;else&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "No YTCL.url files were found"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;fi&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Backup last URL files"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;sh -c 'ls *.url | grep YTCL' | sed 's/\(YTCL.*\)\.url/\1/' | while read NAME&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;do&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;mv -f ${NAME}.url ${NAME}.bkp-$(date +%Y%m%d%H%M%S)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;done&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "#### End of Execution of ytcl_watch.sh at $(date -u) ####"&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;STRONG style="font-family: inherit; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;ytcl_diff.sh&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This script performs the following steps:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Check if the channel ID exists and if it has public videos&lt;/LI&gt;
&lt;LI&gt;If the Channel exists and has public videos, recursively, using a YouTube Data API v3, all URLs of public videos are extracted and saved in a file.&lt;/LI&gt;
&lt;/UL&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="100%"&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;#!/bin/bash -f&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;source /var/opt/CPshrd-R81.10/tmp/.CPprofile.sh&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;#Script Directory&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;EXECDIR="/home/admin/ytcl"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;#Google API Variables&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;GAPIKEY=$(cat gapikey)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;CID=""&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;MR=5&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;NTP_S=""&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "#### Executing ytcl_diff.sh at $(date -u) ####"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;cat YouTubeChannels-AllowList.diff | sed 's/"YTCL\-\(.*\)"/\1/' | while read CID&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;do&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;if [[ $(curl_cli -s -k "&lt;A href="https://www.googleapis.com/youtube/v3/search?key=$GAPIKEY&amp;amp;channelId=$CID&amp;amp;part=snippet,id&amp;amp;order=date&amp;amp;maxResults=1" target="_blank" rel="noopener"&gt;https://www.googleapis.com/youtube/v3/search?key=$GAPIKEY&amp;amp;channelId=$CID&amp;amp;part=snippet,id&amp;amp;order=date&amp;amp;maxResults=1&lt;/A&gt;" | jq '.pageInfo.totalResults') -gt 0 ]]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Erasing file YTCL-$CID.url"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;&amp;gt; YTCL-${CID}.url&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;curl_cli -k -s "&lt;A href="https://www.googleapis.com/youtube/v3/search?key=$GAPIKEY&amp;amp;channelId=$CID&amp;amp;part=snippet,id&amp;amp;order=date&amp;amp;maxResults=$MR" target="_blank" rel="noopener"&gt;https://www.googleapis.com/youtube/v3/search?key=$GAPIKEY&amp;amp;channelId=$CID&amp;amp;part=snippet,id&amp;amp;order=date&amp;amp;maxResults=$MR&lt;/A&gt;" &amp;gt; result-${CID}.txt&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;while true&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;do&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;if [[ $(cat result-${CID}.txt | jq '.' | grep "nextPageToken" | wc -l) -gt 0 ]]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "nextPageToken ($NTP_S) found for channel $CID"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;NTP_S="$(cat result-${CID}.txt | jq '.' | grep nextPageToken | cut -d '"' -f 4)"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Adding URLs to file YTCL-${CID}.urls - nextPageToken will be $NTP_S"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;cat result-${CID}.txt | jq '.items[].id.videoId' | grep -v null | sed 's/^\"/\"www\.youtube\.com\/watch\?v\=/g' &amp;gt;&amp;gt; YTCL-${CID}.url&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;curl_cli -k -s "&lt;A href="https://www.googleapis.com/youtube/v3/search?key=$GAPIKEY&amp;amp;channelId=$CID&amp;amp;part=snippet,id&amp;amp;order=date&amp;amp;maxResults=$MR&amp;amp;pageToken=$NTP_S" target="_blank" rel="noopener"&gt;https://www.googleapis.com/youtube/v3/search?key=$GAPIKEY&amp;amp;channelId=$CID&amp;amp;part=snippet,id&amp;amp;order=date&amp;amp;maxResults=$MR&amp;amp;pageToken=$NTP_S&lt;/A&gt;" &amp;gt; result-${CID}.txt&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;else&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "nextPageToken not found or last page for channel $CID"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Adding last page of URLs to file YTCL-$CID.urls"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;cat result-${CID}.txt | jq '.items[].id.videoId' | grep -v null | sed 's/^\"/\"www\.youtube\.com\/watch\?v\=/g' &amp;gt;&amp;gt; YTCL-${CID}.url&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "File $CID.url finished"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;break&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;fi&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;done&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;else&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "YouTube Channel $CID - No public videos found or channel ID is wrong"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;fi&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;done&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "#### End of Execution of ytcl_diff.sh at $(date -u) ####"&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;STRONG style="font-family: inherit; background-color: #ffffff;"&gt;&lt;BR /&gt;ytcl_update.sh&lt;/STRONG&gt;&lt;STRONG&gt;&lt;BR /&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This script performs the following steps:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Updates the corresponding YouTube Channel object with the channel title in the “COMMENTS” field, which can be used as a search parameter in SmartConsole in the object tree&lt;/LI&gt;
&lt;LI&gt;Check which URLs of public videos identified in the previous process have not yet been registered in the corresponding channel object and add them.&lt;/LI&gt;
&lt;/UL&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="100%"&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;#!/bin/bash -f&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;source /var/opt/CPshrd-R81.10/tmp/.CPprofile.sh&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;#Script Directory&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;EXECDIR="/home/admin/ytcl"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;#Check Point Management Variables&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;APIKEY=$(cat apikey)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;MGMTIP="192.168.157.100"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;#Google API Variables&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;GAPIKEY=$(cat gapikey)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;cd $EXECDIR&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "#### Executing ytcl_update.sh at $(date -u) ####"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "MGMT - Login"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;mgmt_cli login --management $MGMTIP api-key $APIKEY &amp;gt; sid_b.txt&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;sh -c 'ls *.url' |grep YTCL | sed 's/YTCL\-\(.*\)\.url/\1/' | while read NAME&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;do&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;mgmt_cli --management $MGMTIP -s sid_b.txt show application-site name "YTCL-${NAME}" --format json | jq '."url-list"[]' | sort &amp;gt; YTCL-${NAME}.list&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Creating new YTCL-${NAME}.diff file"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;diff YTCL-${NAME}.url YTCL-${NAME}.list | grep "&amp;lt;" | sed 's/&amp;lt; //' &amp;gt; YTCL-${NAME}.diff&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Checking YTCL-${NAME}.diff file"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;if [[ $(cat YTCL-${NAME}.diff | wc -l) -gt 0 ]]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Updating Channel Title on Object comments"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;CTITLE=$(curl_cli -k -s "&lt;A href="https://www.googleapis.com/youtube/v3/search?key=$GAPIKEY&amp;amp;channelId=${NAME}&amp;amp;part=snippet,id&amp;amp;order=date&amp;amp;maxResults=1" target="_blank" rel="noopener"&gt;https://www.googleapis.com/youtube/v3/search?key=$GAPIKEY&amp;amp;channelId=${NAME}&amp;amp;part=snippet,id&amp;amp;order=date&amp;amp;maxResults=1&lt;/A&gt;" | jq '.items[].snippet.channelTitle')&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "mgmt_cli --management $MGMTIP -s sid_b.txt set application-site name \"YTCL-${NAME}\" comments $CTITLE --format json"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;mgmt_cli --management $MGMTIP -s sid_b.txt set application-site name "YTCL-${NAME}" comments "$CTITLE" --format json | jq -c '.'&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Reading file YTCL-${NAME}.diff and update object ${NAME}"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;cat YTCL-${NAME}.diff | while read URL&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;do&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;mgmt_cli --management $MGMTIP -s sid_b.txt set application-site name "YTCL-${NAME}" url-list.add $URL --format json | jq -c '.'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;done&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;else&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "No changes on YTCL-${NAME}.diff file"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;fi&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;done&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "MGMT - Publishing Session"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;mgmt_cli --management $MGMTIP -s sid_b.txt publish --format json | jq -c '.'&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "MGMT - Pushing Policy"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;mgmt_cli --management $MGMTIP -s sid_b.txt install-policy policy-package "standard" access true threat-prevention false targets.1 "R81.10-StandAlone" --format json | jq -c '.'&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "MGMT - Logout"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;mgmt_cli --management $MGMTIP -s sid_b.txt logout --format json | jq -c '.'&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "#### End of Execution of ytcl_update.sh at $(date -u) ####"&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;A target="_blank" name="_Toc77203055"&gt;&lt;/A&gt;&lt;FONT size="5"&gt;Step by step&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Enable the Functions: “&lt;EM&gt;Application Control&lt;/EM&gt;” and “&lt;EM&gt;URL Filtering&lt;/EM&gt;”.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12665i0836AA55128F3342/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Enable the SSL Inspection Functionality “Enable HTTPS Inspection”.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12666iD6A0424420199662/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Create the “YouTube-Domain” object
&lt;UL&gt;
&lt;LI&gt;Add YouTube domain: &lt;STRONG&gt;\.youtube\.com&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Check the option “&lt;EM&gt;URLs are defined as Regular Expression&lt;/EM&gt;”&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 628px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12667i6BF07A12950213F4/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Create the object “Application/Site Group” and name it “YouTubeChannels-AllowList”
&lt;UL&gt;
&lt;LI&gt;Add the YouTube domain: &lt;STRONG&gt;\.youtube\.com&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Check the option “&lt;EM&gt;URLs are defined as Regular Expression&lt;/EM&gt;”&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12668i9FCE218FBAF9D546/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Add to the group “YouTubeChannels-AllowList”
&lt;UL&gt;
&lt;LI&gt;Click on the + button&lt;/LI&gt;
&lt;LI&gt;Click on the * button&lt;/LI&gt;
&lt;LI&gt;Select the option “&lt;EM&gt;Application/Site...&lt;/EM&gt;”&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12669i14322D2D55D51E12/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Configure the group using the following pattern
&lt;UL&gt;
&lt;LI&gt;Name Nomenclature: &lt;STRONG&gt;YTCL-{Channel ID}&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Add all the base URLs you want to allow for the channel:
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;&lt;EM&gt;&lt;A href="http://www.youtube.com/channel/UCgEsWb335K-Me6Zwv0n21YQ" target="_blank" rel="noopener"&gt;www.youtube.com/channel/UCgEsWb335K-Me6Zwv0n21YQ&lt;/A&gt;&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;&lt;A href="http://www.youtube.com/user/Dome9Security/featured" target="_blank" rel="noopener"&gt;www.youtube.com/user/Dome9Security/featured&lt;/A&gt;&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;&lt;A href="http://www.youtube.com/user/Dome9Security/videos" target="_blank" rel="noopener"&gt;www.youtube.com/user/Dome9Security/videos&lt;/A&gt;&lt;/EM&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Uncheck the option “&lt;EM&gt;URLs are defined as Regular Expression&lt;/EM&gt;”&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 528px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12670i5D4D24AE25E381A1/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Configure access rules for:
&lt;UL&gt;
&lt;LI&gt;Blocking the QUIC protocol&lt;/LI&gt;
&lt;LI&gt;Web Filtering access rule with Inline Layer (Application Control &amp;amp; URL Filtering)
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;Allow rule for the YouTube Channel List (&lt;STRONG&gt;YouTubeChannels-AllowList&lt;/STRONG&gt;)&lt;/LI&gt;
&lt;LI&gt;Block rule for the YouTube Domain (&lt;STRONG&gt;YouTube-Domain&lt;/STRONG&gt;)&lt;/LI&gt;
&lt;LI&gt;Allow rule for the YouTube Application&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12671i9138C9F241F654BA/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 644px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12672iF03375AB7C5D1281/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 626px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12675iBD1077ABE71205DD/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Copy the 03 (three) script files to the Check Point Management Server&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12676i9484573AB49D57E4/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Create the &lt;STRONG&gt;apikey&lt;/STRONG&gt; file containing the Check Point Management user API key and the &lt;STRONG&gt;gpaikey&lt;/STRONG&gt; file containing the Google API key to query via YouTube Data API v3&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12677iA9D4872E0EA4102F/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Run the &lt;STRONG&gt; ytcl_watch.sh&lt;/STRONG&gt; script&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12680i3AD3B73CBA290150/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&amp;nbsp;
&lt;OL&gt;
&lt;LI&gt;Check the content of the object “&lt;STRONG&gt;YouTubeChannels-AllowList&lt;/STRONG&gt;” and look for &lt;EM&gt;Application/Site&lt;/EM&gt; that start with the prefix “&lt;STRONG&gt;YTCL-&lt;/STRONG&gt;“ and save it on the file “&lt;STRONG&gt;YouTubeChannels-AllowList.list&lt;/STRONG&gt;”.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12681iEC881C5472416004/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12682i22829611B23080D3/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Compares the contents of the file “&lt;STRONG&gt;YouTubeChannels-AllowList.list&lt;/STRONG&gt;” with the file “&lt;STRONG&gt;YouTubeChannels-AllowList.list1&lt;/STRONG&gt;” to see if any new channels have been added and generates the file “&lt;STRONG&gt;YouTubeChannels-AllowList.diff&lt;/STRONG&gt;”&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12683iE5B7ACE45FF6C995/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;If the “&lt;STRONG&gt;YouTubeChannels-AllowList.diff&lt;/STRONG&gt;” file has any information it will run a new script named “&lt;STRONG&gt;ytcl_diff.sh&lt;/STRONG&gt;” to create the &lt;STRONG&gt;YTCL-{Channel_ID}.url&lt;/STRONG&gt; files with the URLs of all the public videos of each new chaneel that was added to the “&lt;STRONG&gt;YouTubeChannels-AllowList&lt;/STRONG&gt;” object&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12684iD0C2E2BD0818D5B8/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Automatic execution of the ytcl_diff.sh script to create the {Channel_ID}.url files, if the “&lt;STRONG&gt;YouTubeChannels-AllowList.diff&lt;/STRONG&gt;” file is not empty&lt;/LI&gt;
&lt;LI&gt;The contents of the “&lt;STRONG&gt;YouTubeChannels-AllowList&lt;/STRONG&gt;” file will be moved to the “&lt;STRONG&gt;YouTubeChannels-AllowList1&lt;/STRONG&gt;” file to be used as a comparison basis for the next script execution.&lt;/LI&gt;
&lt;LI&gt;Automatic execution of the ytcl_update.sh script if there are &lt;STRONG&gt;YTCL-{Channel_ID}.url&lt;/STRONG&gt; files in the directory to update the objects referring to YouTube Channels with the list of URLs that are not yet registered, in addition to updating the COMMENTS field with the channel title.&lt;/LI&gt;
&lt;LI&gt;The script moves the &lt;STRONG&gt;YTCL-{Channel_ID}.url&lt;/STRONG&gt; files generated in the previous step to the &lt;STRONG&gt;YTCL-{Channel_ID}.bkp-$(date +%Y%m%d%H%M%S)&lt;/STRONG&gt; format to serve as a history of which URLs were added at that time&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;LI&gt;Automatic execution of the &lt;STRONG&gt;ytcl_diff.sh&lt;/STRONG&gt;script&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12685i9252E99D01E66F64/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&amp;nbsp;
&lt;OL&gt;
&lt;LI&gt;For each line of the “&lt;STRONG&gt;YouTubeChannels-AllowList.diff&lt;/STRONG&gt;” the following actions are performed:&lt;/LI&gt;
&lt;LI&gt;Parsing to find the YouTube Channel ID, as defined in the creation of objects of the “&lt;EM&gt;Application/Site&lt;/EM&gt;” type following the &lt;STRONG&gt;YTCL-{Channel_ID}&lt;/STRONG&gt; rule&lt;/LI&gt;
&lt;LI&gt;Delete, if any, the contents of the &lt;STRONG&gt;YTCL-{Channel_ID}.url&lt;/STRONG&gt; file&lt;/LI&gt;
&lt;LI&gt;Check if the Channel ID is valid and if the Channel has public video&lt;/LI&gt;
&lt;LI&gt;Recursively list all the channel's public video URLs and save to &lt;STRONG&gt;{Channel_ID}.url&lt;/STRONG&gt; file&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12686i9F6AB4111B040D6B/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12687i5DCDED7B4FB96F3F/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;LI&gt;Automatic execution of the ytcl_diff.sh script&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12688i6301F935656479B2/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12689i7D08B99DB153A742/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12690i8D6D5BA85299D7AC/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;
&lt;OL&gt;
&lt;LI&gt;Extracts the YouTube channel ID that was added to the “&lt;STRONG&gt;YouTubeChannels-AllowList&lt;/STRONG&gt;” object as per specified naming &lt;STRONG&gt;YTCL-{Channel_ID}&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Query the object of type “&lt;EM&gt;Application/Site&lt;/EM&gt;” added to the group “&lt;STRONG&gt;YouTubeChannels-AllowList&lt;/STRONG&gt;” and save the current URL list of each object in a file “&lt;STRONG&gt;YTCL-{Channel_ID}.list&lt;/STRONG&gt;” &lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 480px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12691i88609B9AD2D8A375/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Checks the difference between the files “&lt;STRONG&gt;YTCL-{Channel_ID}.url&lt;/STRONG&gt;”, generated by the script ytcl_diff.sh and the newly created file “&lt;STRONG&gt;YTCL-{Channel_ID}.list&lt;/STRONG&gt;” and saves the additional URLs of the file “&lt;STRONG&gt;YTCL-{Channel_ID}.url&lt;/STRONG&gt;” in another “&lt;STRONG&gt;YTCL-{Channel_ID}.diff&lt;/STRONG&gt; file&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 480px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12692i88FFC32DD0AA109A/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Updates the “Comments” field of the “&lt;STRONG&gt;YTCL-{Channel_ID}&lt;/STRONG&gt;” object with the corresponding YouTube Channel Title&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12693i11514D60E39ACE2C/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12694i7BDEE7BE69B4B6EF/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Updates the list of URLs of the object “&lt;STRONG&gt;YTCL-{Channel_ID}&lt;/STRONG&gt;” with the additional URLs saved in the file “&lt;STRONG&gt;YTCL-{Channel_ID}.diff&lt;/STRONG&gt;”&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12695i6886F2E60B3121BD/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Publish the session&lt;/LI&gt;
&lt;LI&gt;Install the Policy&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;LI&gt;List of files in directory after execution&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 650px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12696iC020E6139EDEF65A/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&amp;nbsp;
&lt;UL&gt;
&lt;LI style="list-style-type: none;"&gt;&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Oct 2021 15:10:12 GMT</pubDate>
    <dc:creator>Thiago_Mourao</dc:creator>
    <dc:date>2021-10-27T15:10:12Z</dc:date>
    <item>
      <title>How to allow specific YouTube channels</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-allow-specific-YouTube-channels/m-p/132724#M6376</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="6" color="#FF00FF"&gt;&lt;A target="_blank" name="_Toc77203145"&gt;&lt;/A&gt;&lt;FONT color="#000000"&gt;How to allow specific YouTube channels&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Security Engineering Brazil&lt;/P&gt;
&lt;P&gt;July, 2021&lt;/P&gt;
&lt;P&gt;Versão 02&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Author:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Thiago Mourao, SE&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Revision:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Contents&lt;/P&gt;
&lt;P&gt;&lt;A href="#_Toc77203049" target="_blank" rel="noopener"&gt;How to allow specific YouTube channels &lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="#_Toc77203050" target="_blank" rel="noopener"&gt;Goal&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="#_Toc77203051" target="_blank" rel="noopener"&gt;Warning&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="#_Toc77203052" target="_blank" rel="noopener"&gt;Limitations and Requirements&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="#_Toc77203053" target="_blank" rel="noopener"&gt;Topology&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="#_Toc77203054" target="_blank" rel="noopener"&gt;Scripts&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="#_Toc77203055" target="_blank" rel="noopener"&gt;Step by step&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;A target="_blank" name="_Toc77203050"&gt;&lt;/A&gt;&lt;FONT size="5"&gt;Goal&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The purpose of the document is to describe the steps necessary to make a granular control of the YouTube channel in Check Point's NGFW, thus being possible to allow or block access to specific YouTube channels from their unique identifier.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;A target="_blank" name="_Toc77203051"&gt;&lt;/A&gt;&lt;FONT size="5"&gt;Warning&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;The script used in this Proof of Concept was created by me (&lt;A href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/4755" target="_blank" rel="noopener"&gt;Thiago Mourão&lt;/A&gt;) using official reference documents from the API Management API Reference v1.8 (&lt;A href="https://sc1.checkpoint.com/documents/latest/APIs/index.html#introduction~v1.8%20" target="_blank" rel="noopener"&gt;link&lt;/A&gt;), for more details and updates to the API available through Check Point, please visit the &lt;EM&gt;Check Point API Reference&lt;/EM&gt; (&lt;A href="https://sc1.checkpoint.com/documents/latest/api_reference/index.html" target="_blank" rel="noopener"&gt;link&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;A target="_blank" name="_Toc77203052"&gt;&lt;/A&gt;&lt;FONT size="5"&gt;Limitations and Requirements&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;For this lab, version 1.8 of the Check Point management API was used, available from version R81.10 of the Gaia Operating System. For earlier versions, please refer to the corresponding version reference guide to ensure support for the commands used.&lt;/LI&gt;
&lt;LI&gt;To list videos from a YouTube channel, it was used in YouTube Data API v3 (&lt;A href="https://developers.google.com/youtube/v3" target="_blank" rel="noopener"&gt;link&lt;/A&gt;) and for that you will need to create your own key for this API.&lt;/LI&gt;
&lt;LI&gt;To do granular control of YouTube video URLs it will be necessary configure the HTTPS inspection (SSL Inspection) on the gateway&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;A target="_blank" name="_Toc77203053"&gt;&lt;/A&gt;&lt;FONT size="5"&gt;Topology&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;In this lab, we used an R81.10 version of Check Point Gaia defined as Security Gateway and Manager (StandAlone) at the same time and they were virtualized on VMware Workstation 16.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Virtual Environment:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;1 x Check Point StandAlone (Gateway/ Manager) R81.10&lt;/LI&gt;
&lt;LI&gt;1 x Microsoft Windows 10&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG style="font-family: inherit; background-color: #ffffff;"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12663i439ADAFC7E6DEEEC/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG style="font-family: inherit; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;A target="_blank" name="_Toc77203054"&gt;&lt;/A&gt;&lt;FONT size="5"&gt;Scripts&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG style="font-family: inherit; background-color: #ffffff;"&gt;ytcl_watch.sh&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This script performs the following steps:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Checks whether new YouTube channels have been considered for the “YouTubeChannels-AllowList” object in the format defined as YTCL-Channel_ID&lt;/LI&gt;
&lt;LI&gt;If a new channel has been added to the scripts “ytcl_diff.sh” and “ytcl_update.sh” it should be possible, in case there are no errors and the damaged channels have public videos.&lt;/LI&gt;
&lt;/UL&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="100%"&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;#!/bin/bash -f&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;source /var/opt/CPshrd-R81.10/tmp/.CPprofile.sh&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;#Script Directory&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;EXECDIR="/home/admin/ytcl"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;APIKEY=$(cat apikey)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;MGMTIP="192.168.157.100"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;cd $EXECDIR&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "#### Executing ytcl_watch.sh at $(date -u) ####"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "MGMT - Login"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;mgmt_cli login --management $MGMTIP api-key $APIKEY &amp;gt; sid_a.txt&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Erasing YouTubeChannels-AllowList.list file"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;&amp;gt; YouTubeChannels-AllowList.list&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Getting information from YouTubeChannels-AllowList Object and saving on file YouTubeChannels-AllowList.list"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;mgmt_cli --management $MGMTIP -s sid_a.txt show application-site-group name "YouTubeChannels-AllowList" --format json | jq '.members[] | select( .name | contains("YTCL"))' | jq '.name' | sort &amp;gt; YouTubeChannels-AllowList.list&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "MGMT - Logout"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;mgmt_cli --management $MGMTIP -s sid_a.txt logout --format json | jq -c '.'&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Erasing YouTubeChannels-AllowList.diff file"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;&amp;gt; YouTubeChannels-AllowList.diff&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Creating new YouTubeChannels-AllowList.diff file"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;diff &amp;lt;(sort YouTubeChannels-AllowList.list) &amp;lt;(sort YouTubeChannels-AllowList.list1) | grep "&amp;lt;" | sed 's/&amp;lt; //' &amp;gt; YouTubeChannels-AllowList.diff&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Checking YouTubeChannels-AllowList.diff file"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;if [[ $(cat YouTubeChannels-AllowList.diff | wc -l) -gt 0 ]]&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Running script $EXECDIR/ytcl_diff.sh to creating .url files"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;sh $EXECDIR/ytcl_diff.sh&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;else&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "No changes on YouTubeChannels-AllowList.list file"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;fi&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Copying file $EXECDIR/YouTubeChannels-AllowList.list to $EXECDIR/YouTubeChannels-AllowList.list1"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;cp -f $EXECDIR/YouTubeChannels-AllowList.list $EXECDIR/YouTubeChannels-AllowList.list1&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;if [[ $(sh -c 'ls *.url | grep YTCL' | wc -l) -gt 0 ]]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Running script $EXECDIR/ytcl_update.sh to Updating URLs on Group YouTubeChannels-AllowList"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;sh $EXECDIR/ytcl_update.sh&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;else&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "No YTCL.url files were found"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;fi&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Backup last URL files"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;sh -c 'ls *.url | grep YTCL' | sed 's/\(YTCL.*\)\.url/\1/' | while read NAME&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;do&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;mv -f ${NAME}.url ${NAME}.bkp-$(date +%Y%m%d%H%M%S)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;done&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "#### End of Execution of ytcl_watch.sh at $(date -u) ####"&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;STRONG style="font-family: inherit; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;ytcl_diff.sh&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This script performs the following steps:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Check if the channel ID exists and if it has public videos&lt;/LI&gt;
&lt;LI&gt;If the Channel exists and has public videos, recursively, using a YouTube Data API v3, all URLs of public videos are extracted and saved in a file.&lt;/LI&gt;
&lt;/UL&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="100%"&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;#!/bin/bash -f&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;source /var/opt/CPshrd-R81.10/tmp/.CPprofile.sh&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;#Script Directory&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;EXECDIR="/home/admin/ytcl"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;#Google API Variables&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;GAPIKEY=$(cat gapikey)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;CID=""&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;MR=5&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;NTP_S=""&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "#### Executing ytcl_diff.sh at $(date -u) ####"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;cat YouTubeChannels-AllowList.diff | sed 's/"YTCL\-\(.*\)"/\1/' | while read CID&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;do&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;if [[ $(curl_cli -s -k "&lt;A href="https://www.googleapis.com/youtube/v3/search?key=$GAPIKEY&amp;amp;channelId=$CID&amp;amp;part=snippet,id&amp;amp;order=date&amp;amp;maxResults=1" target="_blank" rel="noopener"&gt;https://www.googleapis.com/youtube/v3/search?key=$GAPIKEY&amp;amp;channelId=$CID&amp;amp;part=snippet,id&amp;amp;order=date&amp;amp;maxResults=1&lt;/A&gt;" | jq '.pageInfo.totalResults') -gt 0 ]]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Erasing file YTCL-$CID.url"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;&amp;gt; YTCL-${CID}.url&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;curl_cli -k -s "&lt;A href="https://www.googleapis.com/youtube/v3/search?key=$GAPIKEY&amp;amp;channelId=$CID&amp;amp;part=snippet,id&amp;amp;order=date&amp;amp;maxResults=$MR" target="_blank" rel="noopener"&gt;https://www.googleapis.com/youtube/v3/search?key=$GAPIKEY&amp;amp;channelId=$CID&amp;amp;part=snippet,id&amp;amp;order=date&amp;amp;maxResults=$MR&lt;/A&gt;" &amp;gt; result-${CID}.txt&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;while true&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;do&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;if [[ $(cat result-${CID}.txt | jq '.' | grep "nextPageToken" | wc -l) -gt 0 ]]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "nextPageToken ($NTP_S) found for channel $CID"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;NTP_S="$(cat result-${CID}.txt | jq '.' | grep nextPageToken | cut -d '"' -f 4)"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Adding URLs to file YTCL-${CID}.urls - nextPageToken will be $NTP_S"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;cat result-${CID}.txt | jq '.items[].id.videoId' | grep -v null | sed 's/^\"/\"www\.youtube\.com\/watch\?v\=/g' &amp;gt;&amp;gt; YTCL-${CID}.url&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;curl_cli -k -s "&lt;A href="https://www.googleapis.com/youtube/v3/search?key=$GAPIKEY&amp;amp;channelId=$CID&amp;amp;part=snippet,id&amp;amp;order=date&amp;amp;maxResults=$MR&amp;amp;pageToken=$NTP_S" target="_blank" rel="noopener"&gt;https://www.googleapis.com/youtube/v3/search?key=$GAPIKEY&amp;amp;channelId=$CID&amp;amp;part=snippet,id&amp;amp;order=date&amp;amp;maxResults=$MR&amp;amp;pageToken=$NTP_S&lt;/A&gt;" &amp;gt; result-${CID}.txt&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;else&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "nextPageToken not found or last page for channel $CID"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Adding last page of URLs to file YTCL-$CID.urls"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;cat result-${CID}.txt | jq '.items[].id.videoId' | grep -v null | sed 's/^\"/\"www\.youtube\.com\/watch\?v\=/g' &amp;gt;&amp;gt; YTCL-${CID}.url&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "File $CID.url finished"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;break&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;fi&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;done&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;else&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "YouTube Channel $CID - No public videos found or channel ID is wrong"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;fi&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;done&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "#### End of Execution of ytcl_diff.sh at $(date -u) ####"&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;STRONG style="font-family: inherit; background-color: #ffffff;"&gt;&lt;BR /&gt;ytcl_update.sh&lt;/STRONG&gt;&lt;STRONG&gt;&lt;BR /&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;This script performs the following steps:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Updates the corresponding YouTube Channel object with the channel title in the “COMMENTS” field, which can be used as a search parameter in SmartConsole in the object tree&lt;/LI&gt;
&lt;LI&gt;Check which URLs of public videos identified in the previous process have not yet been registered in the corresponding channel object and add them.&lt;/LI&gt;
&lt;/UL&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="100%"&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;#!/bin/bash -f&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;source /var/opt/CPshrd-R81.10/tmp/.CPprofile.sh&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;#Script Directory&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;EXECDIR="/home/admin/ytcl"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;#Check Point Management Variables&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;APIKEY=$(cat apikey)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;MGMTIP="192.168.157.100"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;#Google API Variables&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;GAPIKEY=$(cat gapikey)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;cd $EXECDIR&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "#### Executing ytcl_update.sh at $(date -u) ####"&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "MGMT - Login"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;mgmt_cli login --management $MGMTIP api-key $APIKEY &amp;gt; sid_b.txt&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;sh -c 'ls *.url' |grep YTCL | sed 's/YTCL\-\(.*\)\.url/\1/' | while read NAME&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;do&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;mgmt_cli --management $MGMTIP -s sid_b.txt show application-site name "YTCL-${NAME}" --format json | jq '."url-list"[]' | sort &amp;gt; YTCL-${NAME}.list&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Creating new YTCL-${NAME}.diff file"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;diff YTCL-${NAME}.url YTCL-${NAME}.list | grep "&amp;lt;" | sed 's/&amp;lt; //' &amp;gt; YTCL-${NAME}.diff&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Checking YTCL-${NAME}.diff file"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;if [[ $(cat YTCL-${NAME}.diff | wc -l) -gt 0 ]]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;then&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Updating Channel Title on Object comments"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;CTITLE=$(curl_cli -k -s "&lt;A href="https://www.googleapis.com/youtube/v3/search?key=$GAPIKEY&amp;amp;channelId=${NAME}&amp;amp;part=snippet,id&amp;amp;order=date&amp;amp;maxResults=1" target="_blank" rel="noopener"&gt;https://www.googleapis.com/youtube/v3/search?key=$GAPIKEY&amp;amp;channelId=${NAME}&amp;amp;part=snippet,id&amp;amp;order=date&amp;amp;maxResults=1&lt;/A&gt;" | jq '.items[].snippet.channelTitle')&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "mgmt_cli --management $MGMTIP -s sid_b.txt set application-site name \"YTCL-${NAME}\" comments $CTITLE --format json"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;mgmt_cli --management $MGMTIP -s sid_b.txt set application-site name "YTCL-${NAME}" comments "$CTITLE" --format json | jq -c '.'&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "Reading file YTCL-${NAME}.diff and update object ${NAME}"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;cat YTCL-${NAME}.diff | while read URL&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;do&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;mgmt_cli --management $MGMTIP -s sid_b.txt set application-site name "YTCL-${NAME}" url-list.add $URL --format json | jq -c '.'&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;done&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;else&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "No changes on YTCL-${NAME}.diff file"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;fi&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;done&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "MGMT - Publishing Session"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;mgmt_cli --management $MGMTIP -s sid_b.txt publish --format json | jq -c '.'&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "MGMT - Pushing Policy"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;mgmt_cli --management $MGMTIP -s sid_b.txt install-policy policy-package "standard" access true threat-prevention false targets.1 "R81.10-StandAlone" --format json | jq -c '.'&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "MGMT - Logout"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;mgmt_cli --management $MGMTIP -s sid_b.txt logout --format json | jq -c '.'&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" size="1 2 3 4 5 6 7"&gt;echo "#### End of Execution of ytcl_update.sh at $(date -u) ####"&lt;/FONT&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;A target="_blank" name="_Toc77203055"&gt;&lt;/A&gt;&lt;FONT size="5"&gt;Step by step&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Enable the Functions: “&lt;EM&gt;Application Control&lt;/EM&gt;” and “&lt;EM&gt;URL Filtering&lt;/EM&gt;”.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12665i0836AA55128F3342/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Enable the SSL Inspection Functionality “Enable HTTPS Inspection”.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12666iD6A0424420199662/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Create the “YouTube-Domain” object
&lt;UL&gt;
&lt;LI&gt;Add YouTube domain: &lt;STRONG&gt;\.youtube\.com&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Check the option “&lt;EM&gt;URLs are defined as Regular Expression&lt;/EM&gt;”&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 628px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12667i6BF07A12950213F4/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Create the object “Application/Site Group” and name it “YouTubeChannels-AllowList”
&lt;UL&gt;
&lt;LI&gt;Add the YouTube domain: &lt;STRONG&gt;\.youtube\.com&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Check the option “&lt;EM&gt;URLs are defined as Regular Expression&lt;/EM&gt;”&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12668i9FCE218FBAF9D546/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Add to the group “YouTubeChannels-AllowList”
&lt;UL&gt;
&lt;LI&gt;Click on the + button&lt;/LI&gt;
&lt;LI&gt;Click on the * button&lt;/LI&gt;
&lt;LI&gt;Select the option “&lt;EM&gt;Application/Site...&lt;/EM&gt;”&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12669i14322D2D55D51E12/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Configure the group using the following pattern
&lt;UL&gt;
&lt;LI&gt;Name Nomenclature: &lt;STRONG&gt;YTCL-{Channel ID}&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Add all the base URLs you want to allow for the channel:
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;&lt;EM&gt;&lt;A href="http://www.youtube.com/channel/UCgEsWb335K-Me6Zwv0n21YQ" target="_blank" rel="noopener"&gt;www.youtube.com/channel/UCgEsWb335K-Me6Zwv0n21YQ&lt;/A&gt;&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;&lt;A href="http://www.youtube.com/user/Dome9Security/featured" target="_blank" rel="noopener"&gt;www.youtube.com/user/Dome9Security/featured&lt;/A&gt;&lt;/EM&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;&lt;A href="http://www.youtube.com/user/Dome9Security/videos" target="_blank" rel="noopener"&gt;www.youtube.com/user/Dome9Security/videos&lt;/A&gt;&lt;/EM&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Uncheck the option “&lt;EM&gt;URLs are defined as Regular Expression&lt;/EM&gt;”&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 528px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12670i5D4D24AE25E381A1/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Configure access rules for:
&lt;UL&gt;
&lt;LI&gt;Blocking the QUIC protocol&lt;/LI&gt;
&lt;LI&gt;Web Filtering access rule with Inline Layer (Application Control &amp;amp; URL Filtering)
&lt;UL class="lia-list-style-type-circle"&gt;
&lt;LI&gt;Allow rule for the YouTube Channel List (&lt;STRONG&gt;YouTubeChannels-AllowList&lt;/STRONG&gt;)&lt;/LI&gt;
&lt;LI&gt;Block rule for the YouTube Domain (&lt;STRONG&gt;YouTube-Domain&lt;/STRONG&gt;)&lt;/LI&gt;
&lt;LI&gt;Allow rule for the YouTube Application&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12671i9138C9F241F654BA/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 644px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12672iF03375AB7C5D1281/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 626px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12675iBD1077ABE71205DD/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Copy the 03 (three) script files to the Check Point Management Server&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12676i9484573AB49D57E4/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Create the &lt;STRONG&gt;apikey&lt;/STRONG&gt; file containing the Check Point Management user API key and the &lt;STRONG&gt;gpaikey&lt;/STRONG&gt; file containing the Google API key to query via YouTube Data API v3&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12677iA9D4872E0EA4102F/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Run the &lt;STRONG&gt; ytcl_watch.sh&lt;/STRONG&gt; script&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12680i3AD3B73CBA290150/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&amp;nbsp;
&lt;OL&gt;
&lt;LI&gt;Check the content of the object “&lt;STRONG&gt;YouTubeChannels-AllowList&lt;/STRONG&gt;” and look for &lt;EM&gt;Application/Site&lt;/EM&gt; that start with the prefix “&lt;STRONG&gt;YTCL-&lt;/STRONG&gt;“ and save it on the file “&lt;STRONG&gt;YouTubeChannels-AllowList.list&lt;/STRONG&gt;”.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12681iEC881C5472416004/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12682i22829611B23080D3/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Compares the contents of the file “&lt;STRONG&gt;YouTubeChannels-AllowList.list&lt;/STRONG&gt;” with the file “&lt;STRONG&gt;YouTubeChannels-AllowList.list1&lt;/STRONG&gt;” to see if any new channels have been added and generates the file “&lt;STRONG&gt;YouTubeChannels-AllowList.diff&lt;/STRONG&gt;”&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12683iE5B7ACE45FF6C995/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;If the “&lt;STRONG&gt;YouTubeChannels-AllowList.diff&lt;/STRONG&gt;” file has any information it will run a new script named “&lt;STRONG&gt;ytcl_diff.sh&lt;/STRONG&gt;” to create the &lt;STRONG&gt;YTCL-{Channel_ID}.url&lt;/STRONG&gt; files with the URLs of all the public videos of each new chaneel that was added to the “&lt;STRONG&gt;YouTubeChannels-AllowList&lt;/STRONG&gt;” object&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12684iD0C2E2BD0818D5B8/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Automatic execution of the ytcl_diff.sh script to create the {Channel_ID}.url files, if the “&lt;STRONG&gt;YouTubeChannels-AllowList.diff&lt;/STRONG&gt;” file is not empty&lt;/LI&gt;
&lt;LI&gt;The contents of the “&lt;STRONG&gt;YouTubeChannels-AllowList&lt;/STRONG&gt;” file will be moved to the “&lt;STRONG&gt;YouTubeChannels-AllowList1&lt;/STRONG&gt;” file to be used as a comparison basis for the next script execution.&lt;/LI&gt;
&lt;LI&gt;Automatic execution of the ytcl_update.sh script if there are &lt;STRONG&gt;YTCL-{Channel_ID}.url&lt;/STRONG&gt; files in the directory to update the objects referring to YouTube Channels with the list of URLs that are not yet registered, in addition to updating the COMMENTS field with the channel title.&lt;/LI&gt;
&lt;LI&gt;The script moves the &lt;STRONG&gt;YTCL-{Channel_ID}.url&lt;/STRONG&gt; files generated in the previous step to the &lt;STRONG&gt;YTCL-{Channel_ID}.bkp-$(date +%Y%m%d%H%M%S)&lt;/STRONG&gt; format to serve as a history of which URLs were added at that time&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;LI&gt;Automatic execution of the &lt;STRONG&gt;ytcl_diff.sh&lt;/STRONG&gt;script&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12685i9252E99D01E66F64/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&amp;nbsp;
&lt;OL&gt;
&lt;LI&gt;For each line of the “&lt;STRONG&gt;YouTubeChannels-AllowList.diff&lt;/STRONG&gt;” the following actions are performed:&lt;/LI&gt;
&lt;LI&gt;Parsing to find the YouTube Channel ID, as defined in the creation of objects of the “&lt;EM&gt;Application/Site&lt;/EM&gt;” type following the &lt;STRONG&gt;YTCL-{Channel_ID}&lt;/STRONG&gt; rule&lt;/LI&gt;
&lt;LI&gt;Delete, if any, the contents of the &lt;STRONG&gt;YTCL-{Channel_ID}.url&lt;/STRONG&gt; file&lt;/LI&gt;
&lt;LI&gt;Check if the Channel ID is valid and if the Channel has public video&lt;/LI&gt;
&lt;LI&gt;Recursively list all the channel's public video URLs and save to &lt;STRONG&gt;{Channel_ID}.url&lt;/STRONG&gt; file&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12686i9F6AB4111B040D6B/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12687i5DCDED7B4FB96F3F/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;LI&gt;Automatic execution of the ytcl_diff.sh script&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12688i6301F935656479B2/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12689i7D08B99DB153A742/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12690i8D6D5BA85299D7AC/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;
&lt;OL&gt;
&lt;LI&gt;Extracts the YouTube channel ID that was added to the “&lt;STRONG&gt;YouTubeChannels-AllowList&lt;/STRONG&gt;” object as per specified naming &lt;STRONG&gt;YTCL-{Channel_ID}&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Query the object of type “&lt;EM&gt;Application/Site&lt;/EM&gt;” added to the group “&lt;STRONG&gt;YouTubeChannels-AllowList&lt;/STRONG&gt;” and save the current URL list of each object in a file “&lt;STRONG&gt;YTCL-{Channel_ID}.list&lt;/STRONG&gt;” &lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 480px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12691i88609B9AD2D8A375/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Checks the difference between the files “&lt;STRONG&gt;YTCL-{Channel_ID}.url&lt;/STRONG&gt;”, generated by the script ytcl_diff.sh and the newly created file “&lt;STRONG&gt;YTCL-{Channel_ID}.list&lt;/STRONG&gt;” and saves the additional URLs of the file “&lt;STRONG&gt;YTCL-{Channel_ID}.url&lt;/STRONG&gt;” in another “&lt;STRONG&gt;YTCL-{Channel_ID}.diff&lt;/STRONG&gt; file&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 480px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12692i88FFC32DD0AA109A/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Updates the “Comments” field of the “&lt;STRONG&gt;YTCL-{Channel_ID}&lt;/STRONG&gt;” object with the corresponding YouTube Channel Title&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12693i11514D60E39ACE2C/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12694i7BDEE7BE69B4B6EF/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Updates the list of URLs of the object “&lt;STRONG&gt;YTCL-{Channel_ID}&lt;/STRONG&gt;” with the additional URLs saved in the file “&lt;STRONG&gt;YTCL-{Channel_ID}.diff&lt;/STRONG&gt;”&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 624px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12695i6886F2E60B3121BD/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt;Publish the session&lt;/LI&gt;
&lt;LI&gt;Install the Policy&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;LI&gt;List of files in directory after execution&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 650px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/12696iC020E6139EDEF65A/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&amp;nbsp;
&lt;UL&gt;
&lt;LI style="list-style-type: none;"&gt;&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2021 15:10:12 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-allow-specific-YouTube-channels/m-p/132724#M6376</guid>
      <dc:creator>Thiago_Mourao</dc:creator>
      <dc:date>2021-10-27T15:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to allow specific YouTube channels</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-allow-specific-YouTube-channels/m-p/178644#M7630</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A class="" href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/4755" target="_self"&gt;&lt;SPAN class=""&gt;Thiago_Mourao&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thank you for the useful information, but we have an issue with the step 9, we want to know how to create the apikey and gapikey files and what does that files contain?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 16:44:34 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-allow-specific-YouTube-channels/m-p/178644#M7630</guid>
      <dc:creator>DavidMM27</dc:creator>
      <dc:date>2023-04-20T16:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to allow specific YouTube channels</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-allow-specific-YouTube-channels/m-p/178781#M7632</link>
      <description>&lt;P&gt;You have to do it in the Google Developers Console.&lt;BR /&gt;See:&amp;nbsp;&lt;A href="https://console.developers.google.com/" target="_blank"&gt;https://console.developers.google.com/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2023 20:34:44 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-allow-specific-YouTube-channels/m-p/178781#M7632</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2023-04-21T20:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to allow specific YouTube channels</title>
      <link>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-allow-specific-YouTube-channels/m-p/243547#M8968</link>
      <description>&lt;P&gt;The ytcl_watch.sh is not working&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 12:19:01 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/API-CLI-Discussion/How-to-allow-specific-YouTube-channels/m-p/243547#M8968</guid>
      <dc:creator>laks_Sparrow</dc:creator>
      <dc:date>2025-03-11T12:19:01Z</dc:date>
    </item>
  </channel>
</rss>

