0

Hi there :)
I'm trying to request the info from "https://www.googleapis.com/sj/v1beta1/tracks". It should give me a full list of my google music tracks. To get the list, it requires you to do a request with an authorization. You get the auth from "https://www.google.com/accounts/ClientLogin?accountType=GOOGLE&Email=EMAIL&Passwd=Password&service=sj".

The thing is, I'm doing a webrequest and it goes through (i think), but im not exactly getting a list. I was hoping you could take a look at it :)

string uri = "https://www.googleapis.com/sj/v1beta1/tracks";
HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create(uri);
httpWebRequest.Headers.Add("Authorization", "GoogleLogin auth=" + AuthID);
WebResponse response = null;
try
{
     response = httpWebRequest.GetResponse();
     Stream stream = response.GetResponseStream();
}

Cheers :)

2
Contributors
1
Reply
2
Views
4 Years
Discussion Span
Last Post by darkagn
0

So what do you get back instead? You will need to read from the response stream and deserialize the returned JSON into a list using whatever DataContract is being returned to you.

Also, you can check the response.StatusCode to see whether the response is a successful response (ie HttpStatusCode.OK) or some sort of problem occurred (such as HttpStatusCode.Unauthorized).

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.