1
votes

1) https://www.googleapis.com/youtube/v3/guideCategories?key=API_KEY&regionCode=US&part=snippet

2) https://www.googleapis.com/youtube/v3/channels?key=API_KEY&categoryId=GCQmVzdCBvZiBZb3VUdWJl&maxResults=10&part=snippet

categoryId=GCQmVzdCBvZiBZb3VUdWJl

retrieved from first api's response

2nd API's response. "items[]" is empty

{
    "kind": "youtube#channelListResponse",
    "etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/JpsJe9kdx343U4W1AnbpwmYdffc\"",
    "pageInfo": {
        "totalResults": 0,
        "resultsPerPage": 10
    },
    "items": []
}

I have also created client id for android app, but don't know how to use it for you tube data api calling.

Expected result is: App should be able to call above API without asking user to use their mail account

1
I'm facing exactly the same issue, passing the categoryId returning empty channel list, changing the categoryId to "id" parameter and passing a channel Id I'm getting the response, if I try the same request using categoryId API explorer I'm getting the results, Only difference is in curl command im not passing any access Token only API , any update from your side for thisSam

1 Answers

0
votes

Try this url for fetch data from channel id

"https://www.googleapis.com/youtube/v3/search?key=" + API_KEY
        + "&channelId=" + CHANNEL_ID + "&part=snippet,id&order=date&maxResults=20";

Hope this work;