We are using the YouTube Content ID API with OAUTH 2.0 client id authentication, it's a bit messy using
HttpError: <HttpError 403 when requesting https://www.googleapis.com/youtube/partner/v1/assets?id=xxxx&onBehalfOfContentOwner=yyyy&alt=json returned "Forbidden">
Code used for the example:
from google.oauth2.service_account import Credentials as ServiceAccountCredentials
from googleapiclient import discovery
secrets_file = "keys.json"
service_name = "youtubePartner"
service_version = "v1"
scopes = ["https://www.googleapis.com/auth/youtubepartner"]
credentials = ServiceAccountCredentials.from_service_account_file(
secrets_file,
scopes=scopes,
)
api = discovery.build(
service_name,
service_version,
credentials=credentials,
cache_discovery=False,
)
response = api.assets().list(id="xxxx", onBehalfOfContentOwner="yyyy").execute()
Solved! Go to Solution.
@hyper7 thanks for your question!
This forum is all about Application Integration. We recommend exploring other Google Cloud forums for more tailored guidance on your specific question, please feel free to reach out if you'd like to explore how Application Integration can help streamline your projects! 😉
@hyper7 thanks for your question!
This forum is all about Application Integration. We recommend exploring other Google Cloud forums for more tailored guidance on your specific question, please feel free to reach out if you'd like to explore how Application Integration can help streamline your projects! 😉