I am trying to get list subscribers of any channel using youtube api using python. But i am getting issue when i run my code it asks me to enter authorisation code and i do not know what it is. I have also enabled oath api. see my code below import os
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
from googleapiclient.discovery import build
import googleapiclient.errors
flow = InstalledAppFlow.from_client_secrets_file("client_secrets.json",
scopes=["https://www.googleapis.com/auth/youtube.readonly"])
flow.run_local_server(port=8080, prompt="consent")
credentials = flow.run_console()
youtube = build("youtube", "v3", credentials=credentials)
request = youtube.subscriptions.list(
part="snippet,contentDetails",
channelId="UC_x5XG1OV2P6uZZ5FSM9Ttw"
)
response = request.execute()
print(response)
is there any way to do so?