Hi
How we can get Youtube Category List with their names.
Thanks
Hi
How we can get Youtube Category List with their names.
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vishal JoshiPosted Jan 12, 2023, 5:23 AM
Hello
You can call the below API to get data.
API will return all categories (names and IDs) for the region you selected
Thanks
Pasang TamangPosted Jan 12, 2023, 8:23 AM
Hi,
API URL given by Vishal is correct. You forgot to remove {} from the exampla link. It should be like below
Regards,
Pasang
Ramco RamcoPosted Jan 12, 2023, 8:19 AM
Hi Vishal
I am getting this error - {
"error": {
"code": 400,
"message": "API key not valid. Please pass a valid API key.",
"errors": [
{
"message": "API key not valid. Please pass a valid API key.",
"domain": "global",
"reason": "badRequest"
}
],
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "API_KEY_INVALID",
"domain": "googleapis.com",
"metadata": {
"service": "youtube.googleapis.com"
}
}
]
}
}
Thanks
Pasang TamangPosted Jan 12, 2023, 5:37 AM
Forgot to include note about enabling Youtube Data API. You need to enable YouTube Data API service in your project in Google Developer console. You can check this link https://support.google.com/googleapi/answer/6158841?hl=en.
Regards,
Pasang
Pasang TamangPosted Jan 12, 2023, 5:34 AM
Hi,
For this first you need to create a project in Google Developer Console. You can check below links to create a project and API key in Google Developer Console
https://support.google.com/googleapi/answer/6251787?hl=en#zippy=%2Ccreate-a-project
https://support.google.com/googleapi/answer/6158862?hl=en
Then in your project you have to install Google.Apis.YouTube.v3 plugin from nuget. And then you can follow below code
Regards,
Pasang
Amit MohantyPosted Jan 12, 2023, 5:22 AM
Try this