I am writing some functions with Youtube API version 3. I use pythonbut confirmed my error in the Google test console.
(I make all authorized requests, just do not insert my key below)
The Python client library automatically adds a parameter forMineto my request Search().list(), although I can set it to false. I cannot remove the parameter from my query, if I omit the argument, it defaults to true. If I set it to false, I get this error:
googleapiclient.errors.HttpError: <HttpError 400 when requesting https://www.googleapis.com/youtube/v3/search?forMine=false&maxResults=50&q=week&part=snippet&alt=json&type=playlist&order=date returned "The request contains an invalid combination of search filters and/or restrictions. Note that you must set the <code>type</code> parameter to <code>video</code> if you set a value for the <code>eventType</code>, <code>videoCaption</code>, <code>videoCategoryId</code>, <code>videoDefinition</code>, <code>videoDimension</code>, <code>videoDuration</code>, <code>videoEmbeddable</code>, <code>videoLicense</code>, <code>videoSyndicated</code>, or <code>videoType</code> parameters.">
Symptoms in the API:
error request ( forMineparameter deleted):
GET https://www.googleapis.com/youtube/v3/search?part=snippet&forMine=false&q=week&type=playlist&key={YOUR_API_KEY}
request that will not work (parameter forMineset to false):
GET https://www.googleapis.com/youtube/v3/search?part=snippet&q=week&type=playlist&key={YOUR_API_KEY}
python, , , , :
result = youtube_service.search().list(part='snippet', forMine=False, q='test', type='playlist', maxResults=50).execute()
- , , API?