I have enabled Youtube Data API an hour ago and made a few requests and I am already getting the following error:
b'{\n "error": {\n "code": 403,\n "message": "The request cannot be completed because you have exceeded your \\u003ca href=\\"/youtube/v3/getting-started#quota\\"\\u003equota\\u003c/a\\u003e.",\n "errors": [\n {\n "message": "The request cannot be completed because you have exceeded your \\u003ca href=\\"/youtube/v3/getting-started#quota\\"\\u003equota\\u003c/a\\u003e.",\n "domain": "youtube.quota",\n "reason": "quotaExceeded"\n }\n ]\n }\n}\n'
When I go to dashboard I see the following:
and
Below is the code I am trying:
def upload_video(video_file, channel_id, youtube_object): try: # Define the video metadata request_body = {'snippet': {'title': 'TESTING BY ME','description': 'Your video description','tags': ['tag1', 'tag2', 'tag3'],'categoryId': '22', # Set the appropriate category ID'channelId': channel_id # Set the channel ID },'status': {'privacyStatus': 'private' # Set the privacy status of the video } } # Create a media upload object for the video file media = MediaFileUpload(video_file) # Execute the video insert request response = youtube_object.videos().insert( part='snippet,status', body=request_body, media_body=media ).execute() # Print the video ID of the uploaded video print('Video uploaded. Video ID:', response['id']) except HttpError as e: print('An HTTP error occurred:') print(e.content) except Exception as e: print('An error occurred:') print(e)