I am looking for a way to programatically set a video's game. By "game" I mean the video setting that makes these things appear in the video's description:
I can set and read the category using the categoryId
field, e.g. "20"
for Gaming. But I was unable to find any official way to set some kind of game id.
The Youtube Studio seems to perform this action to achieve the goal (shortened):
POST https://studio.youtube.com/youtubei/v1/video_manager/metadata_update
{
"encryptedVideoId": "UEUN1xD6BFI",
"videoReadMask": {...},
"gameTitle": {
"newKgEntityId": "/g/11gfhqhs78"
},
"context": {...}
}
And it uses something called SAPISIDHASH
for authorization, which some people seem to have reverse-engineered, but before I even try to do that I wanted to see if there's an official supported way of doing this.