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

Getting google credentials for Youtube Data API in Flask

$
0
0

I want to report comments using markAsSpam to YouTube comments where its ID's were extracted beforehand. The code below works but only in the terminal.

from google_auth_oauthlib.flow import InstalledAppFlowfrom googleapiclient.discovery import buildflow = InstalledAppFlow.from_client_secrets_file('client_secret.json', ["https://www.googleapis.com/auth/youtube.force-ssl"])credentials = flow.run_console()youtube = build('youtube', 'v3', credentials=credentials)request = youtube.comments().markAsSpam(id='some_id')request.execute()

The flow.run_console() shows a link in the terminal where the user visits to copy a string, so it can be entered in the terminal where the process continues and the comment is finally marked as spam. How do I make this work in the browser?


Viewing all articles
Browse latest Browse all 3638

Trending Articles



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