Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3640

Youtube: Exceed quota error for newly created API

$
0
0

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:

enter image description here

and

enter image description here

andenter image description here

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)

Viewing all articles
Browse latest Browse all 3640

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>