I want to perform delete subscription of youtube api V3 in my application. But I am not able to get it. Here my code is
HttpDelete httDelete = new HttpDelete("https://www.googleapis.com/youtube/v3/subscriptions");
httDelete.setHeader("Content-Type", "application/json");
httDelete.setHeader("Authorization",MY_ACCESS_TOKEN);
httDelete.setHeader("id",channelId");
HttpClient httpclient = new DefaultHttpClient();
HttpResponse response = httpclient.execute(httDelete);
String responseString = StreamUtils.convertToString(response.getEntity().getContent());
Here is my response
{
"error": {
"errors": [
{
"domain": "global",
"reason": "required",
"message": "Required parameter: id",
"locationType": "parameter",
"location": "id"
}
],
"code": 400,
"message": "Required parameter: id"
}
Please give me any suggestions.I am waiting for your quick response.