YouTube.com/activate on Google Assistant
The step by step for activating YouTube on Google Chromecast is extremely easy. However, since Google own and control both Chromecast and YouTube it’s very easy to link the two together. You can use the Chromecast extension or using a direct approach.
Website : http://os4youtube.com/activate.html
John Adward commented
A YouTube activation code is a is generated by the youtube app on certain devices, for eg Apple, Xbox Wii, etc or other connected devices, which is done through a google account. The activation code is required for the initialization of the sign-in process. To receive a #youtubecomactivate code for the app, users need to sign in into their Google account either through Gmail or Google+ account that is linked with their YouTube account. Once an account is synced, the user is prompted to give it access to their device and the YouTube app.