I need to find a way to pin comments in YouTube automatically. I have checked YouTube API v3 documentation but it does not have this feature. Is there any idea?
To initialize the automatic mechanism, you first need to open your web-browser Web Developer Tools Network tab, then pin an ad hoc comment, you should notice a XHR request to perform_comment_action endpoint. Right-click this request and copy it as cURL. Notice the last field actions in the JSON encoded --data-raw argument. Decode this base64 encoded field and modify the first plaintext argument Ug...Ag to the comment id you want to pin and re-encode the field in base64 and then execute the cURL request and that's it!
Note that there is no need to modify any other parameter for pinning a comment on another video than the ad hoc comment is posted on.
How to pin Youtube comments with python automatically