Hi
I am trying to get Youtube Subscriber list.
{
"error": {
"code": 401,
"message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. ,
"errors": [
{
"message": "Login Required.",
"domain": "global",
"reason": "required",
"location": "Authorization",
"locationType": "header"
}
],
"status": "UNAUTHENTICATED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "CREDENTIALS_MISSING",
"domain": "googleapis.com",
"metadata": {
"method": "youtube.api.v3.V3DataSubscriptionService.Insert",
"service": "youtube.googleapis.com"
}
}
]
}
}
var client = new RestClient("https://www.googleapis.com/youtube/v3/subscriptions?part=subscriberSnippet");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddHeader("authorization", "client_id:65634569812-koxxxxxddddddddsssssv9tqq.apps.googleusercontent.com, client_secret:GOCSPX-ysdesdsffsdsfddssd9");
request.AddParameter("application/json", "{\n\"grant_type\":\"client_credentials\"\n}", ParameterType.RequestBody);
IRestResponse objresponse = client.Execute(request);
if (objresponse != null)
{ }
Thanks