I'm playing around with the VK API, and setup an app and have setup everything I need so far.
However, when I call the account.GetProfiles
method against mz
profile, I get the following error message:
{"error":{"error_code":15,"error_msg":"Access denied: no access to call this method","request_params":[{"key":"oauth","value":"1"},{"key":"method","value":"account.getProfileInfo"},{"key":"uid","value":"430334214"}]}}
My code for the query is as follows:
String getProfile = "https://api.vk.com/method/account.getProfileInfo?uid="+userID+"&access_token="+oauth2Token;
URL profile = new URL(getProfile);
HttpURLConnection connection = (HttpURLConnection) profile .openConnection();
System.out.println("/#/Debug: "+profile .toString());
connection.setRequestMethod("GET");
int responseCode = connection.getResponseCode();
Anyone have an idea? Unfortunately there's not much online in English... And I've been struggling for over an hour trying to figure this one out...
if I just call the getProfiles
method, all works like a charm, but I want to get more data...
Cheers