The documentation for the parameter mySubscribers
of subscribers.list
states:
This parameter can only be used in a properly authorized request.
It is important to understand that there are two ways to query the YouTube API:
With an API key. You can generate a key in the Cloud Console and would then append it to the request with &key=
, just like you did.
With an authorization token. A token authorizes you to access the API in behalf of another user (channel). Then you can not only retrieve data, but also change channel or video information or upload videos. Furthermore, you can access data that only the respective user can see, but that is not visible to the public. See this guide on how to use the OAuth 2.0 framework in order to access private user data.
The latter process is a little more complicated, but it is necessary if you wish to use the mySubscriptions
or mine
parameters. These parameters are not available when simply using an API key because an API key is not tied to a user/channel.
Since you wrote that you want to get your "own channel Subscriber list" I assume you are interested in a list of people that have subscribed to you and not a list of people that you have subscribed to. For that scenario you can actually not use the channelId
parameter of the subscriptions.list
endpoint, since the documentation states:
The channelId parameter specifies a YouTube channel ID. The API will only return that channel's subscriptions.
(In practice that means all the channels that you have subscribed to, which is not what you want.)
In order to retrieve a list of people that have subscribed to your channel, you need to authorize your request using an OAuth 2.0 token (see the guide linked above).
Also note that just as you won't see these subscribers via the YouTube website, they won't show up in the API if a user decides to hide their subscriptions in their privacy settings.