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 :)

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).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.