WebRequest request = WebRequest.Create("https://api.vk.com/method/audio.get?owner_id=" + Settings1.Default.id + "&need_user=0&access_token=" + Settings1.Default.token); WebResponse response = request.GetResponse(); Stream dataStream = response.GetResponseStream(); StreamReader reader = new StreamReader(dataStream); string responseFromServer = reader.ReadToEnd(); reader.Close(); response.Close(); responseFromServer = HttpUtility.HtmlDecode(responseFromServer); JToken token = JToken.Parse(responseFromServer); audioList = token["response"].Children().Skip(1).Select(c => c.ToObject<Audio>()).ToList(); 

Comes response :

access denied, no access to this method.

  • and you got the rights? see vk.com/dev/audio.get : To call this method, your application must have permissions: audio - BOPOH
  • Try to write more detailed questions. Explain exactly what you see the problem, how to reproduce it, what you want to get as a result, etc. - Nicolas Chabanovsky
  • The string to get the token in the studio. Most likely the answer lies in it. - Sergey
  • Received at last - Dima Potapov
  • now another problem is JToken token = JToken.Parse (responseFromServer); audioList = Enumerable.Skip (token ["response"]. Children (), 1) .Select (c => c.ToObject <Audio> ()). ToList (); throws the error An exception of type 'Newtonsoft.Json.JsonSerializationException in the newtonsoft.Json.dll but it wasn’t even a case of deserializing object: PropertyName. Path '', line 1, position 33. - Dima Potapov

0