Reputation: 71
In Python, I am currently using Youtube v3 api for accessing and modifying my videos on the chaneel. It is working fine while inserting to playlist or uploading.
However, I am unable to find a way to delete the videos through api. It returns Insufficient permission when i call the api call.
Below is my code. Please tell me what do I need to pass as an argument?
client = get_authenticated_service(args)
response = client.videos().delete(
id='<my videoid>'
).execute()
Upvotes: 0
Views: 239
Reputation: 117291
video.delete requires one of the following scopes in order for you to access to delete a video.
You have not posted your authorization code but i would have to guess if you are getting Insufficient permission its because you dont have access to delete the video in question.
First make sure you are requesting the proper scopes. Then do a video.get to ensure that you actually have access to this video. Remember that YouTube is channel based so when you authenticate you will only have access to the videos in that channel.
Upvotes: 1