I am working on project which uses youtube API client to add and delete videos. For uploading videos i am using the web token created on behalf of my account as an installed app. And it is working as expected.
But i am not able to use the same web token for any other APIs like "videos.list", "videos.delete". So for accessing the "videos.list" API i created a service account and used the credentials of that service account and it also worked.
When i try to access the "videos.delete" API i am not able to use both credentials which i mentioned above. When i use the web token for installed app this is the error i am getting:
screenshot of the error
when i try to use the credentials of the above mentioned service account, the error i am getting is:
screenshot of the error
Other details:
I am using the sufficient scopes which are suggested by youtube
I am using the correct google account for creating the service account
I am providing the correct path to the webtoken
I am using a brand account in youtube (My doubt is while authentication, API is getting confused with the accounts which the operations has to be done(normal account/brand account))
I need to find a way to access the "videos.delete" API without user consent through browser, or what are the error possibilities which i am facing while accessing delete API.
Please help. Thanks in advance.