Can I get a list of all subscribers from a channel that's not mine? I.e. I want to get all subscribers from pewdiepie channel. Today, with the Youtube API v3, I can get his subscriptions, but I do not found any documentations about get his subscribers. Anyone knows something about it?
Thanks in advance.
Subscribers is a list of the people currently subscribed to a channel.
If you check Channels resource returned by channel.list the best you can do is get the subscriberCount. So no you can not get a list of the subscribers to a channel. This has nothing to do with if you own the channel or not the data does not appear to be exposed by the API.
Background info:
A subscription resource contains information about a YouTube user
subscription. A subscription notifies a user when new videos are added
to a channel or when another user takes one of several actions on
YouTube, such as uploading a video, rating a video, or commenting on a
video.
Request subscriptions for a channel i do not own
GET https://www.googleapis.com/youtube/v3/subscriptions?part=snippet%2CcontentDetails&channelId=UC4rasfm9J-X4jNl9SvXp8xA&key={YOUR_API_KEY}
Response
{
"error": {
"errors": [
{
"domain": "youtube.subscription",
"reason": "subscriptionForbidden",
"message": "The requester is not allowed to access the requested subscriptions."
}
],
"code": 403,
"message": "The requester is not allowed to access the requested subscriptions."
}
}
The YouTube API will not return subscriptions for a channel that the authenticated user does not own.
Related
I'm having problem with the youtube partner api.
I have written an application that correctly establishes an oauth connection between myself and previously authorised Content Manager page and can view my associated channels, create and manage assets etc.
I have a colleague from a different organisation with a separate content manager account that manages around 20 separate channels. They can use the app to successfully complete the oauth flow. However when we try and iterate their channel listings they receive the following error:
Google_Service_Exception: { "error": { "errors": [ { "domain": "youtube.common", "reason": "cmsUserAccountNotFound", "message": "The CMS user is not allowed to act on behalf of the specified content owner." } ], "code": 403, "message": "The CMS user is not allowed to act on behalf of the specified content owner." }
If they add my account as an administrator of the Content Manager account, I can however see their pages. They have permission to manage all pages under the account (and are the administrator)
My question is:
Is this because they don't have permission to use the API (although they have authorised the App that has requested permissions)?
If we create a service account and add it to their Content Manager account and change the oauth flow to this, will this resolve the issue?
...Or is there something else I'm missing?
Many thanks in advance for advice.
Currently our Youtube data API v3 is enabled.
However, we found there was some error while we calling this API.
The screen shows as the following:
Google_Service_Exception : {
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured. YouTube Data API has not been used in project 10xxxxxxxxx29 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=10xxxxxxxxx29 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"extendedHelp": "https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=10xxxxxxxxx29"
}
],
"code": 403,
"message": "Access Not Configured. YouTube Data API has not been used in project 10xxxxxxxxx29 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=10xxxxxxxxx29 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
}
}
We try to create a new O Auth 2.0 ID, but the issue was still got same error.
Is there any way to resolve this problem?
Thanks
Google allows for 50000 request per month/per user.So seem your website has high traffic.You can get another API key from your other gmail then put into API settings.Hope this help.
We are using YouTube Data API v3 for quite some time now but suddenly it started responding with error 403 saying that the access needs to be enabled.
Here is the error message:
{
"code": 403,
"errors": [
{
"domain": "usageLimits",
"message": "Access Not Configured. YouTube Data API has not been used in project {projectId} before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project={projectId} then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"reason": "accessNotConfigured",
"extendedHelp": "https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project={projectId}"
}
],
"message": "Access Not Configured. YouTube Data API has not been used in project {projectId} before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project={projectId} then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."
}
We have disable and re-enable all api wee use (youtube-data-api-v3, contacts api, google+ api). We have also try to generate new client-id and client secret without success.
Finally we have noticed that quota for request per day have been set to 0.
This is certainly the raison of why request we can not make any request to API, but we can not change this value.
Anyone have faced this issue before ?
What can i do to raise the limit of the quota ?
See this issue #211012781
Hi. If you're seeing Queries per day quota set to 0 and the API is indeed enabled, then this means that your project’s access to YouTube Data API Service has been disabled.
You should’ve received a notice via email regarding this action, which also contains the steps that need to be taken to regain the project’s access. But just in case you missed it, please fill out and submit the exceptions form below:
https://support.google.com/youtube/contact/yt_api_form?hl=en
It is stated somewhere that you should link to a billing account and then you can raise the limit from zero to anything.
So I'm trying to insert a video into someone else's playlist (I'm a collaborator). I can insert the video from youtube.com (website), but doing it via the YouTube API V3 gives a 403.
Response:
{ "error": { "errors": [ {
"domain": "youtube.playlistItem",
"reason": "playlistItemsNotAccessible",
"message": "Forbidden" } ], "code": 403, "message": "Forbidden" } }
For the playlists that I own, the youtube api works fine.
Any clue how I can achieve this?
The error indicates that the request made was not properly authorized to insert the specified playlist item
forbidden (403) playlistItemsNotAccessible The request is not properly authorized to insert the specified playlist item.
You can insert a playlist item in your account since you're using it the account authorized by the API. Since you're trying it on a different account, its resulting with the 403 error. I don't know how its possible in the youtube website, though.
How to pass access token in this url for subscribe
https://www.googleapis.com/youtube/v3/subscriptions?part=snippet&key={YOUR_API_KEY}
Hope, this will help you.
First you need to get an authorization from the user.
How to use the Youtube api for subscriptions and
To find your youtube channel ID
Once you have got the authorization from the user whom you want to subscribe to your list.
Then your request should (used from googleapi site)
https://www.googleapis.com/youtube/v3/subscriptions?part=snippet
{
"snippet": {
"resourceId": {
"channelId": "YOUR CHANNEL ID"
}
}
}
ChannelId of yours whom the user wants to subscribe.
You should choose the program where you want to use the api.
URL occurs as
https://www.content.googleapis.com/youtube/v3/subscriptions?part=snippet&key={Base64 of your authorized code}&alt=json