Youtube Upload A Video: Error 401

Is it necessary to publish your app in the Google Cloud Console to post content on YT? Or can it be done with the app in the “testing” phase?

I’m asking since I’ve been using both Gmail and Drive with the same Google Cloud Console App while still in the testing phase and I never faced any problem of this kind.